From f5de0401fe3757957c033043d0cfcab6457cce3f Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Fri, 16 Jul 2010 16:21:51 -0500 Subject: Don't check the size of a label we don't have. --- src/indicator-datetime.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c index 5d7502f..bef53b4 100644 --- a/src/indicator-datetime.c +++ b/src/indicator-datetime.c @@ -730,6 +730,9 @@ build_timeval_array (GArray * timevals, gint mask) static void guess_label_size (IndicatorDatetime * self) { + /* This is during startup. */ + if (self->priv->label == NULL) return; + GtkStyle * style = gtk_widget_get_style(GTK_WIDGET(self->priv->label)); PangoContext * context = gtk_widget_get_pango_context(GTK_WIDGET(self->priv->label)); gint * max_width = &(self->priv->max_width); -- cgit v1.2.3