From b06d24fa477fb8294f2d6d5af6ba699e36ed0b65 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Fri, 19 Apr 2024 22:31:46 +0800 Subject: [PATCH] Fix error when saving nested non-persistent resource --- scene/resources/resource_format_text.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) 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();