! 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 !
If no bars are shown, 1.0.{3,4} will segfault on start
Status:
RESOLVED: DUPLICATE
Product:
Xfce4-cpugraph-plugin
Component:
General

Comments

Description Olivier Brunel 2012-07-04 13:51:09 CEST
With the new option to set bar colors, the plugin will crash on start (after upgrade) when the user disabled the use of bars.

Attached patch to only set bar colors when plugin has bars.
Comment 1 Olivier Brunel 2012-07-04 13:56:04 CEST
alright well, for some reason I can't seem to add an attachment, but it's a very small fix anyhow:

--- panel-plugin/cpu.c.old	2012-07-04 13:34:12.605588007 +0200
+++ panel-plugin/cpu.c	2012-07-04 13:34:41.905586986 +0200
@@ -517,7 +517,7 @@ void set_color( CPUGraph *base, guint nu
 		gtk_widget_modify_bg( base->draw_area, GTK_STATE_INSENSITIVE, &base->colors[0] );
 		gtk_widget_modify_bg( base->draw_area, GTK_STATE_NORMAL, &base->colors[0] );
 	}
-	if( number == 4 )
+	if( number == 4 && base->has_bars )
 	{
 		n = nb_bars( base );
Comment 2 Landry Breuil editbugs 2012-07-04 13:56:32 CEST

*** This bug has been marked as a duplicate of bug 9071 ***

Bug #9083

Reported by:
Olivier Brunel
Reported on: 2012-07-04
Last modified on: 2012-07-04

People

Assignee:
Florian Rivoal
CC List:
1 user

Version

Version:
unspecified

Attachments

Additional information