Check for window_event_result::deleted for kmatrix_view polling 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:
Chris Taylor 2016-10-28 15:27:45 +08:00
parent 1c8ad24da3
commit b2513ab9a0

View file

@ -413,8 +413,8 @@ kmatrix_result kmatrix_view(int network)
return kmatrix_result::abort;
}
while (window_exists(wind))
event_process();
while (event_process() != window_event_result::deleted) {}
gr_free_bitmap_data(km.background);
return (km.aborted ? kmatrix_result::abort : kmatrix_result::proceed);
}