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,7 +250,12 @@ evas_image_load_file_close_avif(void *loader_data)
|
|||
Evas_Loader_Internal *loader;
|
||||
|
||||
loader = loader_data;
|
||||
avifDecoderDestroy(loader->decoder);
|
||||
/*
|
||||
* 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);
|
||||
free(loader_data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue