clients: don't crash weston-desktop-shell without the clock
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c
index 9a1b502..5a81b2c 100644
--- a/clients/desktop-shell.c
+++ b/clients/desktop-shell.c
@@ -419,7 +419,10 @@
}
h=20;
w=170;
- widget_set_allocation(panel->clock->widget, width - w - 8, y - h / 2, w + 1, h + 1);
+
+ if (panel->clock)
+ widget_set_allocation(panel->clock->widget,
+ width - w - 8, y - h / 2, w + 1, h + 1);
}
static void