Make sure wall dialog and hostage dialog close properly
When responding to EVENT_WINDOW_CLOSE, set MainWindow to nullptr - fixing multiple issues with these dialogs including the inability to re-open them and a crash on exiting the editor.
This commit is contained in:
parent
396f1e47f0
commit
b8b19baa92
|
@ -305,6 +305,7 @@ static window_event_result hostage_dialog_handler(UI_DIALOG *dlg,const d_event &
|
|||
return hostage_dialog_created(dlg, h);
|
||||
case EVENT_WINDOW_CLOSE:
|
||||
std::default_delete<hostage_dialog>()(h);
|
||||
MainWindow = nullptr;
|
||||
return window_event_result::ignored;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -390,6 +390,7 @@ window_event_result wall_dialog_handler(UI_DIALOG *dlg,const d_event &event, wal
|
|||
return wall_dialog_created(dlg, wd);
|
||||
case EVENT_WINDOW_CLOSE:
|
||||
std::default_delete<wall_dialog>()(wd);
|
||||
MainWindow = nullptr;
|
||||
return window_event_result::ignored;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue