checked for null _jpegDecompressor and then freed me->icon_gfx

This commit is contained in:
NightlyFox 2018-09-30 16:05:54 -05:00
parent aa45f5ec0c
commit b94a4e28f9

View File

@ -332,6 +332,11 @@ void menuEntryParseIcon(menuEntry_s* me) {
tjhandle _jpegDecompressor = tjInitDecompress();
if(_jpegDecompressor = NULL) {
free(me->icon_gfx);
return;
}
if(tjDecompressHeader2(_jpegDecompressor, me->icon, me->icon_size, &w, &h, &samp)==-1) {
free(me->icon_gfx);
me->icon_gfx = NULL;