forked from old/legacy-imlib2
imlib_save_image_with_error_return(): Check loader return code to prevent use of unitialized memor
This commit is contained in:
parent
6ef51ec4cd
commit
60779351df
|
@ -4636,7 +4636,8 @@ imlib_save_image_with_error_return(const char *filename,
|
|||
error_return);
|
||||
CAST_IMAGE(im, ctx->image);
|
||||
if ((!(im->data)) && (im->loader) && (im->loader->load))
|
||||
im->loader->load(im, NULL, 0, 1);
|
||||
if (!im->loader->load(im, NULL, 0, 1))
|
||||
return;
|
||||
if (!im->data)
|
||||
return;
|
||||
prev_ctxt_image = ctx->image;
|
||||
|
|
Loading…
Reference in New Issue