Make hostage_dialog_handler return window_event_result::close instead of closing itself

This ensures the event system will know what's going on.
This commit is contained in:
Chris Taylor 2016-10-27 17:31:26 +08:00
parent 06632e73e8
commit 9d7b7dc160

View file

@ -375,8 +375,7 @@ static window_event_result hostage_dialog_handler(UI_DIALOG *dlg,const d_event &
Update_flags |= UF_WORLD_CHANGED;
if (GADGET_PRESSED(h->quitButton.get()) || keypress==KEY_ESC)
{
hostage_close_window();
return window_event_result::handled;
return window_event_result::close;
}
LastHostageIndex = CurrentHostageIndex;