forked from enlightenment/efl
Evas avif loader: fix segfault when the avif loader tries to load a non avif image
Test Plan: entice is not crashing Reviewers: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12254
This commit is contained in:
parent
15078f757b
commit
769066f606
|
@ -250,6 +250,11 @@ evas_image_load_file_close_avif(void *loader_data)
|
||||||
Evas_Loader_Internal *loader;
|
Evas_Loader_Internal *loader;
|
||||||
|
|
||||||
loader = loader_data;
|
loader = loader_data;
|
||||||
|
/*
|
||||||
|
* in case _head() fails (because the file is not an avif one),
|
||||||
|
* loader is not filled and loader->decoder is NULL
|
||||||
|
*/
|
||||||
|
if (loader->decoder)
|
||||||
avifDecoderDestroy(loader->decoder);
|
avifDecoderDestroy(loader->decoder);
|
||||||
free(loader_data);
|
free(loader_data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue