Skip to content

Commit 686efe3

Browse files
demolkeWhalesState
authored andcommitted
Check if EditorNode exists
EditorNode is a very heavy object that current test harness cannot create, so after godotengine#96544 editor import cannot be tested. Split off from godotengine#98909
1 parent 276adef commit 686efe3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

editor/editor_interface.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ void EditorInterface::make_scene_preview(const String &p_path, Node *p_scene, in
232232
ERR_FAIL_NULL_MSG(p_scene, "The provided scene is null.");
233233
ERR_FAIL_COND_MSG(p_scene->is_inside_tree(), "The scene must not be inside the tree.");
234234
ERR_FAIL_COND_MSG(!Engine::get_singleton()->is_editor_hint(), "This function can only be called from the editor.");
235+
ERR_FAIL_NULL_MSG(EditorNode::get_singleton(), "EditorNode doesn't exist.");
235236

236237
SubViewport *sub_viewport_node = memnew(SubViewport);
237238
AABB scene_aabb;

0 commit comments

Comments
 (0)