events: fix handling of event with no end date

Fix the sigsegv in edit-dialog and event-widgets when there's no
end-date set.
Set a guard in Utils::gcal_dup_icaltime function.
There's still some problems with the events showing the first time but
not anymore.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=736002
This commit is contained in:
Erick Pérez Castellanos
2014-12-08 11:21:14 -05:00
parent e3976bdb80
commit e62f48bfea
3 changed files with 41 additions and 34 deletions
+3
View File
@@ -128,6 +128,9 @@ gcal_dup_icaltime (const icaltimetype *date)
{
icaltimetype *new_date;
if (date == NULL)
return NULL;
new_date= g_new (icaltimetype, 1);
new_date->year = date->year;
new_date->month = date->month;