Check for window_event_result::deleted in ui_dialog_do_gadgets

This is instead of using window_exists, which could give a false positive if a new window was allocated with the same pointer value as a deleted one.
This commit is contained in:
Chris Taylor 2016-10-28 08:40:50 +08:00
parent 57585171de
commit 917f079f02

View file

@ -318,7 +318,7 @@ window_event_result ui_dialog_do_gadgets(UI_DIALOG * dlg,const d_event &event)
//if (!is_under_another_window( dlg, tmp ))
rval = ui_gadget_do(dlg, tmp, event);
if (!window_exists(wind))
if (rval == window_event_result::deleted)
break;
tmp = tmp->next;