mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Cleanup Window callbacks before destroying in to avoid callback calls with invalid object.
This commit is contained in:
parent
3815903119
commit
a000c64eea
1 changed files with 6 additions and 0 deletions
|
|
@ -569,6 +569,12 @@ void Window::_update_from_window() {
|
||||||
void Window::_clear_window() {
|
void Window::_clear_window() {
|
||||||
ERR_FAIL_COND(window_id == DisplayServer::INVALID_WINDOW_ID);
|
ERR_FAIL_COND(window_id == DisplayServer::INVALID_WINDOW_ID);
|
||||||
|
|
||||||
|
DisplayServer::get_singleton()->window_set_rect_changed_callback(Callable(), window_id);
|
||||||
|
DisplayServer::get_singleton()->window_set_window_event_callback(Callable(), window_id);
|
||||||
|
DisplayServer::get_singleton()->window_set_input_event_callback(Callable(), window_id);
|
||||||
|
DisplayServer::get_singleton()->window_set_input_text_callback(Callable(), window_id);
|
||||||
|
DisplayServer::get_singleton()->window_set_drop_files_callback(Callable(), window_id);
|
||||||
|
|
||||||
if (transient_parent && transient_parent->window_id != DisplayServer::INVALID_WINDOW_ID) {
|
if (transient_parent && transient_parent->window_id != DisplayServer::INVALID_WINDOW_ID) {
|
||||||
DisplayServer::get_singleton()->window_set_transient(window_id, DisplayServer::INVALID_WINDOW_ID);
|
DisplayServer::get_singleton()->window_set_transient(window_id, DisplayServer::INVALID_WINDOW_ID);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue