diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp index 5bcef553e09..7508f94252d 100644 --- a/editor/plugins/editor_preview_plugins.cpp +++ b/editor/plugins/editor_preview_plugins.cpp @@ -342,6 +342,11 @@ Ref EditorPackedScenePreviewPlugin::generate_from_path(const String & Node *p_scene = pack->instantiate(); // The instantiated preview scene + if (!p_scene) { + print_error(vformat("Failed to generate scene thumbnail for %s : Failed to instantiate scene", p_path)); + return Ref(); + } + // Prohibit Viewport class as root when generating thumbnails if (Object::cast_to(p_scene)) { p_scene->queue_free();