summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scene/resources/texture.cpp3
-rw-r--r--scene/resources/texture.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp
index ff80aa4284..6b9407be8c 100644
--- a/scene/resources/texture.cpp
+++ b/scene/resources/texture.cpp
@@ -406,7 +406,7 @@ Image::Format StreamTexture::get_format() const {
return format;
}
-Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> image, int p_size_limit) {
+Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> &image, int p_size_limit) {
ERR_FAIL_COND_V(image.is_null(), ERR_INVALID_PARAMETER);
@@ -502,6 +502,7 @@ Error StreamTexture::_load_data(const String &p_path, int &tw, int &th, int &fla
memdelete(f);
ERR_FAIL_COND_V(img->empty(), ERR_FILE_CORRUPT);
}
+
total_size += img->get_data().size();
mipmap_images.push_back(img);
diff --git a/scene/resources/texture.h b/scene/resources/texture.h
index 3aa007fa00..07416529ae 100644
--- a/scene/resources/texture.h
+++ b/scene/resources/texture.h
@@ -170,7 +170,7 @@ public:
};
private:
- Error _load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> image, int p_size_limit = 0);
+ Error _load_data(const String &p_path, int &tw, int &th, int &flags, Ref<Image> &image, int p_size_limit = 0);
String path_to_file;
RID texture;
Image::Format format;