clients: don't crash weston-desktop-shell without the clock
authorPekka Paalanen <ppaalanen@gmail.com>
Tue, 12 Jun 2012 14:42:26 +0000 (17:42 +0300)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 12 Jun 2012 16:29:17 +0000 (12:29 -0400)
Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
clients/desktop-shell.c

index 9a1b502..5a81b2c 100644 (file)
@@ -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