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

This commit is contained in:
Michał Janiszewski 2018-11-30 23:32:55 +01:00 committed by GitHub
parent 0a9527fd7d
commit ebd4e8f5d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

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)