From 01b1725ba04e374db4f003aa8bbbab8c9790472e Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Tue, 12 Jun 2012 17:42:26 +0300 Subject: [PATCH] clients: don't crash weston-desktop-shell without the clock Signed-off-by: Pekka Paalanen --- clients/desktop-shell.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 @@ panel_resize_handler(struct widget *widget, } 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 -- 2.7.4