From 88c11a1753f539bc4d1696394e766705e48da790 Mon Sep 17 00:00:00 2001 From: demolke Date: Fri, 29 Nov 2024 21:17:40 +0100 Subject: [PATCH] Check if EditorNode exists EditorNode is a very heavy object that current test harness cannot create, so after https://github.com/godotengine/godot/pull/96544 editor import cannot be tested. Split off from https://github.com/godotengine/godot/pull/98909 --- editor/editor_interface.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/editor_interface.cpp b/editor/editor_interface.cpp index 3cdcc91ae931..158d1bd4c4bd 100644 --- a/editor/editor_interface.cpp +++ b/editor/editor_interface.cpp @@ -233,6 +233,7 @@ void EditorInterface::make_scene_preview(const String &p_path, Node *p_scene, in ERR_FAIL_NULL_MSG(p_scene, "The provided scene is null."); ERR_FAIL_COND_MSG(p_scene->is_inside_tree(), "The scene must not be inside the tree."); ERR_FAIL_COND_MSG(!Engine::get_singleton()->is_editor_hint(), "This function can only be called from the editor."); + ERR_FAIL_NULL_MSG(EditorNode::get_singleton(), "EditorNode doesn't exist."); SubViewport *sub_viewport_node = memnew(SubViewport); AABB scene_aabb;