summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/font.cpp2
-rw-r--r--scene/resources/resource_format_text.cpp2
-rw-r--r--scene/resources/texture.cpp2
3 files changed, 4 insertions, 2 deletions
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp
index 663ae5d45d..872d6a043c 100644
--- a/scene/resources/font.cpp
+++ b/scene/resources/font.cpp
@@ -192,7 +192,7 @@ Vector<Variant> BitmapFont::_get_textures() const {
Vector<Variant> rtextures;
for (int i = 0; i < textures.size(); i++)
- rtextures.push_back(textures[i].get_ref_ptr());
+ rtextures.push_back(textures[i]);
return rtextures;
}
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp
index 9779f9c9ca..a5475776a7 100644
--- a/scene/resources/resource_format_text.cpp
+++ b/scene/resources/resource_format_text.cpp
@@ -1377,7 +1377,7 @@ void ResourceFormatSaverTextInstance::_find_resources(const Variant &p_variant,
switch (p_variant.get_type()) {
case Variant::OBJECT: {
- RES res = p_variant.operator RefPtr();
+ RES res = p_variant;
if (res.is_null() || external_resources.has(res))
return;
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index 4ddceed58e..ff9c786b4c 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -588,6 +588,8 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &tw_
image = load_image_from_file(f, p_size_limit);
+ memdelete(f);
+
if (image.is_null() || image->empty()) {
return ERR_CANT_OPEN;
}