clients: don't crash weston-desktop-shell without the clock

Signed-off-by: Pekka Paalanen <ppaalanen@gmail.com>
This commit is contained in:
Pekka Paalanen 2012-06-12 17:42:26 +03:00 committed by Kristian Høgsberg
parent b7a9498a8e
commit 01b1725ba0
1 changed files with 4 additions and 1 deletions

View 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