From: Thierry Lorthiois Date: Sun, 20 Feb 2011 22:47:32 +0000 (+0000) Subject: Fix segfault when a task state has no background in config X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=8990011624a4b3af5b8634d50052543bbdfcfac2;p=chaz%2Ftint2 Fix segfault when a task state has no background in config --- diff --git a/src/taskbar/taskbar.c b/src/taskbar/taskbar.c index 640bda8..da850a7 100644 --- a/src/taskbar/taskbar.c +++ b/src/taskbar/taskbar.c @@ -193,6 +193,8 @@ void init_taskbar_panel(void *p) } for (j=0; jg_task.background[j] == 0) + panel->g_task.background[j] = &g_array_index(backgrounds, Background, 0); if (panel->g_task.background[j]->border.rounded > panel->g_task.area.height/2) { printf("task%sbackground_id has a too large rounded value. Please fix your tint2rc\n", j==0 ? "_" : j==1 ? "_active_" : j==2 ? "_iconified_" : "_urgent_"); g_array_append_val(backgrounds, *panel->g_task.background[j]);