diff options
author | sanikoyes <sanikoyes@163.com> | 2016-03-22 12:46:33 +0800 |
---|---|---|
committer | sanikoyes <sanikoyes@163.com> | 2016-03-22 12:46:33 +0800 |
commit | 0c6f089ce4068c02514261c8a40e231c3779b9d5 (patch) | |
tree | de8f12d81bda6fc080f95f177587a2cf5611b4c9 /scene | |
parent | a895e2e372c9df2a9972f38134ae0ea9c8bf45a8 (diff) |
Fix GDScript crash when call show/hide in func _exit_tree
Diffstat (limited to 'scene')
-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 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(); |