Merge pull request #36260 from timothyqiu/texture-memleak

Fixes memory leak when loading StreamTexture
This commit is contained in:
Rémi Verschelde 2020-02-16 09:16:50 +01:00 committed by GitHub
commit 57823a3266
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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