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:
o9000 2011-02-20 22:32:35 +00:00 committed by mrovi@interfete-web-club.com
parent a8b217e071
commit 37ee594f6a

View file

@ -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;