File tree Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Expand file tree Collapse file tree 1 file changed +19
-16
lines changed Original file line number Diff line number Diff line change @@ -3086,26 +3086,29 @@ fatal_output_debug(const char *msg)
3086
3086
3087
3087
OutputDebugStringW (L"Fatal Python error: " );
3088
3088
3089
- msglen = strlen (msg );
3090
- while (msglen ) {
3091
- size_t i ;
3089
+ if (msg ) {
3090
+ msglen = strlen (msg );
3091
+ while (msglen ) {
3092
+ size_t i ;
3092
3093
3093
- if (buflen > msglen ) {
3094
- buflen = msglen ;
3095
- }
3094
+ if (buflen > msglen ) {
3095
+ buflen = msglen ;
3096
+ }
3096
3097
3097
- /* Convert the message to wchar_t. This uses a simple one-to-one
3098
- conversion, assuming that the this error message actually uses
3099
- ASCII only. If this ceases to be true, we will have to convert. */
3100
- for (i = 0 ; i < buflen ; ++ i ) {
3101
- buffer [i ] = msg [i ];
3102
- }
3103
- buffer [i ] = L'\0' ;
3104
- OutputDebugStringW (buffer );
3098
+ /* Convert the message to wchar_t. This uses a simple one-to-one
3099
+ conversion, assuming that the this error message actually uses
3100
+ ASCII only. If this ceases to be true, we will have to convert. */
3101
+ for (i = 0 ; i < buflen ; ++ i ) {
3102
+ buffer [i ] = msg [i ];
3103
+ }
3104
+ buffer [i ] = L'\0' ;
3105
+ OutputDebugStringW (buffer );
3105
3106
3106
- msg += buflen ;
3107
- msglen -= buflen ;
3107
+ msg += buflen ;
3108
+ msglen -= buflen ;
3109
+ }
3108
3110
}
3111
+
3109
3112
OutputDebugStringW (L"\n" );
3110
3113
}
3111
3114
#endif
You can’t perform that action at this time.
0 commit comments