From: Thierry Lorthiois Date: Sun, 20 Feb 2011 22:32:35 +0000 (+0000) Subject: Fix segfault when the clock has no background in config X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=694d127008b23ab2296d305a218d491c931ff26e;p=chaz%2Ftint2 Fix segfault when the clock has no background in config --- diff --git a/src/clock/clock.c b/src/clock/clock.c index ec17a9f..73547d1 100644 --- a/src/clock/clock.c +++ b/src/clock/clock.c @@ -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;