aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsanikoyes2016-03-22 12:46:33 +0800
committerRémi Verschelde2016-04-02 22:14:49 +0200
commit54625bb7712cd0a3f819e2a0133aaf466a763f6e (patch)
tree791c6a0038f34d32b2dabdbaa70748c12b860240
parent523625a3d16b1bcb084905f23327835c26bb17a4 (diff)
downloadgodot-54625bb7712cd0a3f819e2a0133aaf466a763f6e.tar.gz
godot-54625bb7712cd0a3f819e2a0133aaf466a763f6e.tar.zst
godot-54625bb7712cd0a3f819e2a0133aaf466a763f6e.zip
Fix GDScript crash when call show/hide in func _exit_tree
(cherry picked from commit 0c6f089ce4068c02514261c8a40e231c3779b9d5)
-rw-r--r--scene/gui/control.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 295ec0370..e728a8807 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -522,8 +522,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();