billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=a29dbe45a78d44a31f51ca770d6614a69e2e8cf6

commit a29dbe45a78d44a31f51ca770d6614a69e2e8cf6
Author: Boris Faure <bill...@gmail.com>
Date:   Thu Nov 19 21:04:17 2015 +0100

    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);

-- 


Reply via email to