aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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);
+ }
}
/***