SEGV in xftaskbar4 3.90.0

Matti Rendahl matti at comedialabs.com
Sun Jun 15 14:54:15 CEST 2003


Hi,

[This bug was found when using the ebuilds from Gentoo]

When disabling system tray, xftaskbar4 will segfault at startup in
taskbar_toggle_tray when calling gtk_widget_destroy(...) with
uninitialized taskbar->iconbox.

This patch has fixed it for me.

--matti


diff -Naur xfce-utils-3.90.0/xftaskbar/xftaskbar.c
xfce-utils-3.90.0-z1/xftaskbar/xftaskbar.c
--- xfce-utils-3.90.0/xftaskbar/xftaskbar.c	2003-06-01
17:43:44.000000000 +0200
+++ xfce-utils-3.90.0-z1/xftaskbar/xftaskbar.c	2003-06-15
14:30:02.000000000 +0200
@@ -237,7 +237,11 @@
 	    taskbar->tray_registered = FALSE;
 	}
 	
-        gtk_widget_destroy (taskbar->iconbox);
+	if (taskbar->iconbox)
+	{
+	    gtk_widget_destroy (taskbar->iconbox);
+	    taskbar->iconbox = NULL;
+	}
     }
 }
 
@@ -464,6 +468,8 @@
     taskbar->hbox = gtk_hbox_new (FALSE, 1);
     gtk_container_add (GTK_CONTAINER (taskbar->frame), taskbar->hbox);
 
+    taskbar->iconbox = NULL;
+
     taskbar->tasklist = netk_tasklist_new(screen);
     netk_tasklist_set_grouping(NETK_TASKLIST(taskbar->tasklist),
NETK_TASKLIST_AUTO_GROUP);
    
netk_tasklist_set_include_all_workspaces(NETK_TASKLIST(taskbar->tasklist), taskbar->all_tasks);




More information about the Xfce4-dev mailing list