Skip to content

Commit c0e6be8

Browse files
dlaugtDaniel Laügt
authored andcommitted
Fix memory access violation on fatal error with Windows
1 parent c5ea8e8 commit c0e6be8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Python/pylifecycle.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3360,7 +3360,12 @@ fatal_error(int fd, int header, const char *prefix, const char *msg,
33603360
}
33613361

33623362
#ifdef MS_WINDOWS
3363-
fatal_output_debug(msg);
3363+
if (msg) {
3364+
fatal_output_debug(msg);
3365+
}
3366+
else {
3367+
fatal_output_debug("<message not set>");
3368+
}
33643369
#endif /* MS_WINDOWS */
33653370

33663371
fatal_error_exit(status);

0 commit comments

Comments
 (0)