We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c825fcf + d36a3e5 commit b0dc2b4Copy full SHA for b0dc2b4
editor/plugins/editor_preview_plugins.cpp
@@ -342,6 +342,11 @@ Ref<Texture2D> EditorPackedScenePreviewPlugin::generate_from_path(const String &
342
343
Node *p_scene = pack->instantiate(); // The instantiated preview scene
344
345
+ if (!p_scene) {
346
+ print_error(vformat("Failed to generate scene thumbnail for %s : Failed to instantiate scene", p_path));
347
+ return Ref<Texture2D>();
348
+ }
349
+
350
// Prohibit Viewport class as root when generating thumbnails
351
if (Object::cast_to<Viewport>(p_scene)) {
352
p_scene->queue_free();
0 commit comments