summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2016-03-22 07:31:33 +0100
committerRémi Verschelde <remi@verschelde.fr>2016-03-22 07:31:33 +0100
commit8c2771b6d5f0a50d8b7c9587da8116667d42e03a (patch)
treede8f12d81bda6fc080f95f177587a2cf5611b4c9
parenta895e2e372c9df2a9972f38134ae0ea9c8bf45a8 (diff)
parent0c6f089ce4068c02514261c8a40e231c3779b9d5 (diff)
Merge pull request #4119 from sanikoyes/Pr-crash-exit-tree
Fix GDScript crash when call show/hide in func _exit_tree
-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 d7befd6e11..cb6abc7123 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();