mirror of https://github.com/OpenRCT2/OpenRCT2.git
Provide more checks when handling possibly-gone windows (#8331)
This commit is contained in:
parent
0a9527fd7d
commit
ebd4e8f5d6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue