[gnome-calendar/gnome-3-18] search-view: protect against NULL date



commit 139104ccbd72c5ee34a73e4c0bd25e0851d28507
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue Mar 8 14:30:36 2016 -0300

    search-view: protect against NULL date

 src/gcal-search-view.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/gcal-search-view.c b/src/gcal-search-view.c
index 9d472f3..19fd208 100644
--- a/src/gcal-search-view.c
+++ b/src/gcal-search-view.c
@@ -378,6 +378,13 @@ make_row_for_event_data (GcalSearchView  *view,
   gtk_widget_set_margin_end (box, 6);
   gtk_widget_set_hexpand (name_box, TRUE);
 
+  /* Protect against NULL date */
+  if (comp_dt.value == NULL)
+    {
+      icaltimetype null_date = icaltime_null_date ();
+      comp_dt.value = gcal_dup_icaltime (&null_date);
+    }
+
   /* start date & time */
   if (comp_dt.tzid != NULL)
     tz = g_time_zone_new (comp_dt.tzid);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]