diff options
| author | sanikoyes | 2016-03-22 12:46:33 +0800 |
|---|---|---|
| committer | sanikoyes | 2016-03-22 12:46:33 +0800 |
| commit | 0c6f089ce4068c02514261c8a40e231c3779b9d5 (patch) | |
| tree | de8f12d81bda6fc080f95f177587a2cf5611b4c9 | |
| parent | a895e2e372c9df2a9972f38134ae0ea9c8bf45a8 (diff) | |
| download | godot-0c6f089ce4068c02514261c8a40e231c3779b9d5.tar.gz godot-0c6f089ce4068c02514261c8a40e231c3779b9d5.tar.zst godot-0c6f089ce4068c02514261c8a40e231c3779b9d5.zip | |
Fix GDScript crash when call show/hide in func _exit_tree
| -rw-r--r-- | scene/gui/control.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index d7befd6e1..cb6abc712 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -525,8 +525,8 @@ void Control::_notification(int p_notification) { if (!is_visible()) { - - get_viewport()->_gui_hid_control(this); + if(get_viewport() != NULL) + get_viewport()->_gui_hid_control(this); _modal_stack_remove(); minimum_size_changed(); |
