diff options
Diffstat (limited to 'scene/resources/texture.cpp')
-rw-r--r-- | scene/resources/texture.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |