From f32d2bc7bf141ae1983bcd72b4cdef47865fc9ff Mon Sep 17 00:00:00 2001 From: o9000 Date: Sun, 20 Feb 2011 22:47:32 +0000 Subject: [PATCH] Fix segfault when a task state has no background in config git-svn-id: http://tint2.googlecode.com/svn/trunk@626 121b4492-b84c-0410-8b4c-0d4edfb3f3cc --- src/taskbar/taskbar.c | 2 ++ 1 file changed, 2 insertions(+) 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]);