]> Dogcows Code - chaz/tint2/commitdiff
Fix segfault when a task state has no background in config
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 20 Feb 2011 22:47:32 +0000 (22:47 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Sun, 20 Feb 2011 22:47:32 +0000 (22:47 +0000)
src/taskbar/taskbar.c

index 640bda8058a3f00e64eac2ff7687fd245f773cd2..da850a7932f24df7e4d4fe6e2f43dbaac284a3cc 100644 (file)
@@ -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]);
This page took 0.018815 seconds and 4 git commands to generate.