[Xfce4-commits] <xfdesktop:master> Fix a crash due to accessing the wrong variable when adding menu items.

Jannis Pohlmann noreply at xfce.org
Mon Nov 8 11:52:01 CET 2010


Updating branch refs/heads/master
         to 1e6d4b150de2288f4ae60e0e20e3c663dc6233aa (commit)
       from 7ada68eaff497aad856a8cdb739b0cc38b43ab85 (commit)

commit 1e6d4b150de2288f4ae60e0e20e3c663dc6233aa
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Mon Nov 8 11:50:50 2010 +0100

    Fix a crash due to accessing the wrong variable when adding menu items.

 NEWS                          |    7 +++++++
 src/xfdesktop-app-menu-item.c |    4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index eeb944c..3ba1e4e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+Xfdesktop 4.7.x
+---------------
+
+  * Fix a crash caused by accessing the wrong variable when adding
+    items to the right-click menu.
+
+
 Xfdesktop 4.7.2
 ---------------
 
diff --git a/src/xfdesktop-app-menu-item.c b/src/xfdesktop-app-menu-item.c
index 0bfddb9..e10696a 100644
--- a/src/xfdesktop-app-menu-item.c
+++ b/src/xfdesktop-app-menu-item.c
@@ -173,7 +173,7 @@ xfdesktop_app_menu_item_set_icon(XfdesktopAppMenuItem *app_menu_item)
     GdkPixbuf *pixbuf = NULL;
     GtkWidget *image;
     GtkIconTheme *icon_theme;
-    gchar *p, *name;
+    gchar *p, *name = NULL;
     gchar *filename;
 
     icon_name = garcon_menu_item_get_icon_name(app_menu_item->item);
@@ -199,7 +199,7 @@ xfdesktop_app_menu_item_set_icon(XfdesktopAppMenuItem *app_menu_item)
 
                 /* maybe they point to a file in the pixbufs folder */
                 if (G_UNLIKELY(pixbuf == NULL)) {
-                    filename = g_build_filename("pixmaps", name, NULL);
+                    filename = g_build_filename("pixmaps", icon_name, NULL);
                     name = xfce_resource_lookup(XFCE_RESOURCE_DATA, filename);
                     g_free(filename);
 



More information about the Xfce4-commits mailing list