From 694d127008b23ab2296d305a218d491c931ff26e Mon Sep 17 00:00:00 2001 From: Thierry Lorthiois Date: Sun, 20 Feb 2011 22:32:35 +0000 Subject: [PATCH] Fix segfault when the clock has no background in config --- src/clock/clock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.45.2