Commit 3584e279 by Haoyu Qiu

Fixes memory leak when loading StreamTexture

parent cb68d832
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment