Skip to content

Commit

Permalink
Check if EditorNode exists
Browse files Browse the repository at this point in the history
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
  • Loading branch information
demolke committed Nov 29, 2024
1 parent c7198dd commit 8e33e25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions editor/editor_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8e33e25

Please sign in to comment.