From b94a4e28f91f31e17867c2e6986e4f82e1d2559b Mon Sep 17 00:00:00 2001 From: NightlyFox Date: Sun, 30 Sep 2018 16:05:54 -0500 Subject: [PATCH] checked for null _jpegDecompressor and then freed me->icon_gfx --- common/menu-entry.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/menu-entry.c b/common/menu-entry.c index c1c0771..2099e34 100644 --- a/common/menu-entry.c +++ b/common/menu-entry.c @@ -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;