Check for window_event_result::deleted in event_send

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:27:02 +08:00
parent c351588bba
commit 9fbd86b0ce

View file

@ -131,7 +131,7 @@ void event_send(const d_event &event)
{
handled = window_send_event(*wind, event);
if (!window_exists(wind)) // break away if necessary: window_send_event() could have closed wind by now
if (handled == window_event_result::deleted) // break away if necessary: window_send_event() could have closed wind by now
break;
if (window_is_modal(*wind))
break;