aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-07-16 16:21:51 -0500
committerTed Gould <ted@gould.cx>2010-07-16 16:21:51 -0500
commitf5de0401fe3757957c033043d0cfcab6457cce3f (patch)
treeb4e7a8dd56c5a982d514aeb85b28e2603338cdcd
parentbf3973945daef188061f2b6a4486206baaacc49d (diff)
downloadayatana-indicator-datetime-f5de0401fe3757957c033043d0cfcab6457cce3f.tar.gz
ayatana-indicator-datetime-f5de0401fe3757957c033043d0cfcab6457cce3f.tar.bz2
ayatana-indicator-datetime-f5de0401fe3757957c033043d0cfcab6457cce3f.zip
Don't check the size of a label we don't have.
-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);