Provide more checks when handling possibly-gone windows (#8331)

This commit is contained in:
Michał Janiszewski authored and GitHub committed 2018-11-30 23:32:55 +01:00
1 parent 0a9527fd7d
commit ebd4e8f5d6
1 file changed
+5 -1
+5 -1
View File
@@ -292,9 +292,13 @@ void window_text_input_key(rct_window* w, char keychar)
// ecx when nonzero means text input success
if (w)
window_event_textinput_call(w, calling_widget, text_input);
// Update the window pointer, as it may have been closed by textinput handler
w = window_find_by_number(calling_class, calling_number);
}
window_invalidate(w);
if (w)
window_invalidate(w);
}
void window_text_input_update7(rct_window* w)