From a29dbe45a78d44a31f51ca770d6614a69e2e8cf6 Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Thu, 19 Nov 2015 21:04:17 +0100 Subject: [PATCH] options_wallpaper: fix CID 1339834: Null pointer dereference --- src/bin/options_wallpaper.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bin/options_wallpaper.c b/src/bin/options_wallpaper.c index 568fad3..9dbb306 100644 --- a/src/bin/options_wallpaper.c +++ b/src/bin/options_wallpaper.c @@ -283,10 +283,13 @@ _refresh_directory(const char* data) //Insert None Item Insert_Gen_Grid_Item_Notify *notify = calloc(1, sizeof(Insert_Gen_Grid_Item_Notify)); - notify->class = item_class; - notify->item = item; + if (notify) + { + notify->class = item_class; + notify->item = item; - _insert_gengrid_item(notify); + _insert_gengrid_item(notify); + } _backgroundlist = _rec_read_directorys(_backgroundlist, data, item_class);