From a7578459c20e8f6c08c764b09fbd11cae49bc18f Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Thu, 20 Feb 2020 09:45:00 +0800 Subject: [PATCH] Fixes crash when loading StreamTexture from file --- scene/resources/texture.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 60a9ca8f0f..7fb3ba5155 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -405,7 +405,6 @@ Ref StreamTexture::load_image_from_file(FileAccess *f, int p_size_limit) } if (img.is_null() || img->empty()) { - memdelete(f); ERR_FAIL_COND_V(img.is_null() || img->empty(), Ref()); }