aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-03-30 13:32:31 -0500
committerTed Gould <ted@gould.cx>2011-03-30 13:32:31 -0500
commitc0166121f74d4d0552f1241a8bc42f380cfbd662 (patch)
treec17fea396ac203f1ae29172e3c70699a99544d77 /src
parentb9355e5f0e32e04c93158e962e985f60abfbb35b (diff)
downloadayatana-indicator-datetime-c0166121f74d4d0552f1241a8bc42f380cfbd662.tar.gz
ayatana-indicator-datetime-c0166121f74d4d0552f1241a8bc42f380cfbd662.tar.bz2
ayatana-indicator-datetime-c0166121f74d4d0552f1241a8bc42f380cfbd662.zip
Protecting against the widgets being NULL at startup
Diffstat (limited to 'src')
-rw-r--r--src/indicator-datetime.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/indicator-datetime.c b/src/indicator-datetime.c
index 222844e..cafcf1f 100644
--- a/src/indicator-datetime.c
+++ b/src/indicator-datetime.c
@@ -556,7 +556,9 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec
case PROP_SHOW_CLOCK: {
if (g_value_get_boolean(value) != self->priv->show_clock) {
self->priv->show_clock = g_value_get_boolean(value);
- gtk_widget_set_visible (GTK_WIDGET (self->priv->label), self->priv->show_clock);
+ if (self->priv->label != NULL) {
+ gtk_widget_set_visible (GTK_WIDGET (self->priv->label), self->priv->show_clock);
+ }
}
break;
}
@@ -626,7 +628,9 @@ set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec
case PROP_SHOW_CALENDAR: {
if (g_value_get_boolean(value) != self->priv->show_calendar) {
self->priv->show_calendar = g_value_get_boolean(value);
- gtk_widget_set_visible (GTK_WIDGET (self->priv->ido_calendar), self->priv->show_calendar);
+ if (self->priv->ido_calendar != NULL) {
+ gtk_widget_set_visible (GTK_WIDGET (self->priv->ido_calendar), self->priv->show_calendar);
+ }
}
break;
}