! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
check if showdesktop icon found
Status:
RESOLVED: FIXED
Product:
Xfce4-panel

Comments

Description Jani Monoses 2006-03-27 09:59:04 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060314 Ubuntu/dapper Firefox/1.5.0.1
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060314 Ubuntu/dapper Firefox/1.5.0.1

When the icon is not found in the installed themes, the showdesktop plugin should not use and unref it. Spotted by seeing warnings from xfce4-panel on the console.

Index: plugins/showdesktop/showdesktop.c
===================================================================
--- plugins/showdesktop/showdesktop.c   (revision 20593)
+++ plugins/showdesktop/showdesktop.c   (working copy)
@@ -67,8 +67,10 @@
                                     sdd->button->style->ythickness);

     pb = xfce_themed_icon_load (SHOW_DESKTOP_ICON_NAME, width);
-    gtk_image_set_from_pixbuf (GTK_IMAGE (sdd->image), pb);
-    g_object_unref (pb);
+    if (pb) {
+        gtk_image_set_from_pixbuf (GTK_IMAGE (sdd->image), pb);
+        g_object_unref (pb);
+    }
     gtk_widget_set_size_request (GTK_WIDGET (plugin), size, size);

     return TRUE;


Reproducible: Always
Comment 1 Jasper Huijsmans editbugs 2006-03-28 12:54:05 CEST
Hmm, yes indeed. I should check the other plugins as well, thanks.
Comment 2 Jasper Huijsmans editbugs 2006-04-16 10:14:36 CEST
Fixed in rev. 20987.

Bug #1614

Reported by:
Jani Monoses
Reported on: 2006-03-27
Last modified on: 2010-11-20

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Attachments

Additional information