Преглед на файлове

Merge pull request #8019 from Hinsbart/dim_fix

WindowDialog: Fix crash when running as ProjectManager
Rémi Verschelde преди 8 години
родител
ревизия
bde0c2e03e
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      scene/gui/dialogs.cpp

+ 2 - 2
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