Check for window_event_result::deleted for ui_get_filename 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:25:25 +08:00
parent 7f7047063a
commit 1c8ad24da3

View file

@ -301,8 +301,7 @@ int ui_get_filename(char (&filename)[PATH_MAX], const char *const filespec, cons
wind = ui_dialog_get_window(dlg);
while (window_exists(wind))
event_process();
while (event_process() != window_event_result::deleted) {}
//key_flush();