Fix segfault when the clock has no background in config
git-svn-id: http://tint2.googlecode.com/svn/trunk@625 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
parent
a8b217e071
commit
37ee594f6a
1 changed files with 3 additions and 1 deletions
|
@ -143,7 +143,9 @@ void init_clock_panel(void *p)
|
|||
{
|
||||
Panel *panel =(Panel*)p;
|
||||
Clock *clock = &panel->clock;
|
||||
|
||||
|
||||
if (clock->area.bg == 0)
|
||||
clock->area.bg = &g_array_index(backgrounds, Background, 0);
|
||||
clock->area.parent = p;
|
||||
clock->area.panel = p;
|
||||
clock->area._draw_foreground = draw_clock;
|
||||
|
|
Loading…
Reference in a new issue