[Xfce4-commits] r26098 - libxfcegui4/trunk/libxfcegui4

Olivier Fourdan olivier at xfce.org
Sat Sep 22 22:59:41 CEST 2007


Author: olivier
Date: 2007-09-22 20:59:41 +0000 (Sat, 22 Sep 2007)
New Revision: 26098

Modified:
   libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c
Log:
Fix crash of menu if icon file name is not defined

Modified: libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c
===================================================================
--- libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c	2007-09-22 20:09:21 UTC (rev 26097)
+++ libxfcegui4/trunk/libxfcegui4/xfce-appmenuitem.c	2007-09-22 20:59:41 UTC (rev 26098)
@@ -691,7 +691,13 @@
 
     if(app_menu_item->priv->icon_name)
         g_free(app_menu_item->priv->icon_name);
-    
+
+    if(!filename)
+    {
+        app_menu_item->priv->icon_name = NULL;
+        return;
+    }
+
     app_menu_item->priv->icon_name = g_strdup(filename);
     app_menu_item->priv->icon_path = xfce_themed_icon_lookup(filename,
                                                 _xfce_app_menu_item_icon_size);



More information about the Xfce4-commits mailing list