billiob pushed a commit to branch master.

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

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

    options_wallpaper: fix CID 1339835:  Null pointer dereference
---
 src/bin/options_wallpaper.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/bin/options_wallpaper.c b/src/bin/options_wallpaper.c
index c9eec9f..568fad3 100644
--- a/src/bin/options_wallpaper.c
+++ b/src/bin/options_wallpaper.c
@@ -230,15 +230,18 @@ _rec_read_directorys(Eina_List *list, const char 
*root_path,
                             item = calloc(1, sizeof(Background_Item));
                             if (item)
                               {
-                                 notify = calloc(1, 
+                                 notify = calloc(1,
                                           sizeof(Insert_Gen_Grid_Item_Notify));
                                  item->path = eina_stringshare_add(path);
                                  list = eina_list_append(list, item);
-                                 //insert item to gengrid
-                                 notify->class = class;
-                                 notify->item = item;
-                                 //ecore_thread_feedback(th, notify);
-                                 _insert_gengrid_item(notify);
+                                 if (notify)
+                                   {
+                                      //insert item to gengrid
+                                      notify->class = class;
+                                      notify->item = item;
+                                      //ecore_thread_feedback(th, notify);
+                                      _insert_gengrid_item(notify);
+                                   }
                               }
                             break;
                          }

-- 


Reply via email to