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
o9000 o9000
1 files changed,
2 insertions(+),
0 deletions(-)
jump to
M
src/taskbar/taskbar.c
→
src/taskbar/taskbar.c
@@ -193,6 +193,8 @@ panel->g_task.area.height = panel->g_task.maximum_height;
} for (j=0; j<TASK_STATE_COUNT; ++j) { + if (panel->g_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]);