Updating branch refs/heads/master
         to 424418316733e3f8b9b17cd7345fe6d967b06ef8 (commit)
       from 507576da929b1682dc4abcae9a68223074649c87 (commit)

commit 424418316733e3f8b9b17cd7345fe6d967b06ef8
Author: Nick Schermer <n...@xfce.org>
Date:   Sat Sep 8 11:55:19 2012 +0200

    Protect against possible null pointers (bug #9109).

 src/appfinder-category-model.c |    1 +
 src/appfinder-window.c         |    7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/appfinder-category-model.c b/src/appfinder-category-model.c
index 483c4cc..3f3a060 100644
--- a/src/appfinder-category-model.c
+++ b/src/appfinder-category-model.c
@@ -589,6 +589,7 @@ xfce_appfinder_category_model_icon_theme_changed 
(XfceAppfinderCategoryModel *mo
   for (li = model->categories, idx = 0; li != NULL; li = li->next, idx++)
     {
       item = li->data;
+      appfinder_assert (item != NULL);
 
       if (item->pixbuf != NULL)
         {
diff --git a/src/appfinder-window.c b/src/appfinder-window.c
index 155e011..4f99c6a 100644
--- a/src/appfinder-window.c
+++ b/src/appfinder-window.c
@@ -1453,8 +1453,11 @@ xfce_appfinder_window_icon_theme_changed 
(XfceAppfinderWindow *window)
   window->icon_find = xfce_appfinder_model_load_pixbuf (GTK_STOCK_FIND, 
XFCE_APPFINDER_ICON_SIZE_48);
 
   /* drop cached pixbufs */
-  xfce_appfinder_model_icon_theme_changed (window->model);
-  xfce_appfinder_category_model_icon_theme_changed (window->category_model);
+  if (G_LIKELY (window->model != NULL))
+    xfce_appfinder_model_icon_theme_changed (window->model);
+
+  if (G_LIKELY (window->category_model != NULL))
+    xfce_appfinder_category_model_icon_theme_changed (window->category_model);
 
   /* update state */
   xfce_appfinder_window_entry_changed (window);
_______________________________________________
Xfce4-commits mailing list
Xfce4-commits@xfce.org
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to