summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorAndreas Haas <liu.gam3@gmail.com>2017-03-13 15:58:59 +0100
committerAndreas Haas <liu.gam3@gmail.com>2017-03-13 16:05:18 +0100
commita2776af67258a2016777843aae1156af339e72e8 (patch)
treeeb89c7277ee94c6a30dc437d749c934b61bf9c4e /scene/gui
parent9080232f1768e6a7a7ab1b5e9c65f59aa19b2cc0 (diff)
WindowDialog: Fix crash when running as ProjectManager
Fixes a bug introduced in #7970
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/dialogs.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 89008b56bf..a58e62f061 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -205,11 +205,11 @@ void WindowDialog::_notification(int p_what) {
} break;
#ifdef TOOLS_ENABLED
case NOTIFICATION_POST_POPUP: {
- if (get_tree() && get_tree()->is_editor_hint())
+ if (get_tree() && get_tree()->is_editor_hint() && EditorNode::get_singleton())
EditorNode::get_singleton()->dim_editor(true);
} break;
case NOTIFICATION_POPUP_HIDE: {
- if (get_tree() && get_tree()->is_editor_hint())
+ if (get_tree() && get_tree()->is_editor_hint() && EditorNode::get_singleton())
EditorNode::get_singleton()->dim_editor(false);
} break;
#endif