Check for window_event_result::deleted in event_process drawing loop
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:
parent
9fbd86b0ce
commit
57585171de
|
@ -165,9 +165,10 @@ void event_process(void)
|
|||
while (wind != NULL)
|
||||
{
|
||||
window *prev = window_get_prev(*wind);
|
||||
window_event_result result(window_event_result::ignored);
|
||||
if (window_is_visible(wind))
|
||||
window_send_event(*wind, event);
|
||||
if (!window_exists(wind))
|
||||
result = window_send_event(*wind, event);
|
||||
if (result == window_event_result::deleted)
|
||||
{
|
||||
if (!prev) // well there isn't a previous window ...
|
||||
break; // ... just bail out - we've done everything for this frame we can.
|
||||
|
|
Loading…
Reference in a new issue