diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 98a12f14006e..44a5f1d45014 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -1931,17 +1931,8 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant, npk.base = res; npk.property = pi.name; non_persistent_map[npk] = v; - - Ref sres = v; - if (sres.is_valid()) { - resource_set.insert(sres); - saved_resources.push_back(sres); - } else { - _find_resources(v); - } - } else { - _find_resources(v); } + _find_resources(v); } I = I->next();