aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/indicator-datetime.c3
1 files changed, 3 insertions, 0 deletions
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);