WindowDialog: Fix crash when running as ProjectManager

Fixes a bug introduced in #7970
This commit is contained in:
Andreas Haas 2017-03-13 15:58:59 +01:00
parent 9080232f17
commit a2776af672
No known key found for this signature in database
GPG Key ID: B5FFAE1B65FBD2E1

View File

@ -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