fix reported crash of TTY_PERM_INVENT segfaulting
Options processing can be early, even before ttyDisplay is allocated. If we find that TTY_PERM_INVENT initialization is happening too early, just set a marker (iflags.perm_invent_pending) to try again a bit later. The changes in win/share are just to be able to sucessfully reproduce the original issue on Windows. It was easily reproduced on Unix, just by building with TTY_PERM_INVENT in include/config.h and setting OPTIONS=perm_invent in config file.
This commit is contained in:
@@ -720,6 +720,10 @@ init_sound_disp_gamewindows(void)
|
||||
display_nhwindow(WIN_MESSAGE, FALSE);
|
||||
clear_glyph_buffer();
|
||||
display_nhwindow(WIN_MAP, FALSE);
|
||||
#ifdef TTY_PERM_INVENT
|
||||
if (iflags.perm_invent_pending)
|
||||
check_perm_invent_again();
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user