Godot Engine – Multi-platform 2D and 3D game engine
Fix dereference of null resource after support for metadata in scenes was added
nikitalita117f292ed05f
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cppindex b9025519d7d..1a8ac9ade93 100644--- a/scene/resources/resource_format_text.cpp+++ b/scene/resources/resource_format_text.cpp@@ -847,7 +847,11 @@ Error ResourceLoaderText::load() {}if (!missing_resource_properties.is_empty()) {- resource->set_meta(META_MISSING_RESOURCES, missing_resource_properties);+ if (is_scene) {+ packed_scene->set_meta(META_MISSING_RESOURCES, missing_resource_properties);+ } else {+ resource->set_meta(META_MISSING_RESOURCES, missing_resource_properties);+ }}if (!is_scene) {