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
This commit is contained in:
parent
37ee594f6a
commit
f32d2bc7bf
1 changed files with 2 additions and 0 deletions
|
@ -193,6 +193,8 @@ void init_taskbar_panel(void *p)
|
|||
}
|
||||
|
||||
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]);
|
||||
|
|
Loading…
Reference in a new issue