Browse Source

Fixes crash when loading StreamTexture from file

Haoyu Qiu 5 years ago
parent
commit
a7578459c2
1 changed files with 0 additions and 1 deletions
  1. 0 1
      scene/resources/texture.cpp

+ 0 - 1
scene/resources/texture.cpp

@@ -405,7 +405,6 @@ Ref<Image> 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<Image>());
 			}