aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-06-17 10:04:35 -0500
committerCharles Kerr <charles.kerr@canonical.com>2013-06-17 10:04:35 -0500
commit6de8e0386beb02beafc321aaef82176acaae5424 (patch)
tree4b6a7bbdb296a08b0416ae429d478a2ac1ec73fc /src
parent83e473561eea890bbd47476d7dc221c9e1c300c4 (diff)
downloadayatana-ido-6de8e0386beb02beafc321aaef82176acaae5424.tar.gz
ayatana-ido-6de8e0386beb02beafc321aaef82176acaae5424.tar.bz2
ayatana-ido-6de8e0386beb02beafc321aaef82176acaae5424.zip
in idoappointmentmenuitem.c, fix startup issue arising from updating the timestamp label when the strftime format string hasn't been initialized yet.
Diffstat (limited to 'src')
-rw-r--r--src/idoappointmentmenuitem.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/idoappointmentmenuitem.c b/src/idoappointmentmenuitem.c
index 864081b..929e011 100644
--- a/src/idoappointmentmenuitem.c
+++ b/src/idoappointmentmenuitem.c
@@ -280,12 +280,14 @@ create_color_icon_pixbuf (const char * color_spec)
static void
update_timestamp_label (IdoAppointmentMenuItem * self)
{
- char * str;
priv_t * p = self->priv;
- str = g_date_time_format (p->date_time, p->format);
- gtk_label_set_text (GTK_LABEL(p->timestamp_label), str);
- g_free (str);
+ if (p->date_time && p->format)
+ {
+ char * str = g_date_time_format (p->date_time, p->format);
+ gtk_label_set_text (GTK_LABEL(p->timestamp_label), str);
+ g_free (str);
+ }
}
/***