Fixes memory leak when loading StreamTexture

This commit is contained in:
Haoyu Qiu 2020-02-16 13:22:25 +08:00
parent cb68d832f2
commit 3584e27948

View File

@ -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;
}