aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Moya <rodrigo@ximian.com>2003-12-17 21:03:33 +0800
committerRodrigo Moya <rodrigo@src.gnome.org>2003-12-17 21:03:33 +0800
commit2e449b7753660adbb8614a22fdf38e693e91ae86 (patch)
treecfb7c424ca27e68253130456e2103b4a70706f01
parent350bdccc968a80bc7819d1bc7c302584c165b771 (diff)
downloadgsoc2013-evolution-2e449b7753660adbb8614a22fdf38e693e91ae86.tar
gsoc2013-evolution-2e449b7753660adbb8614a22fdf38e693e91ae86.tar.gz
gsoc2013-evolution-2e449b7753660adbb8614a22fdf38e693e91ae86.tar.bz2
gsoc2013-evolution-2e449b7753660adbb8614a22fdf38e693e91ae86.tar.lz
gsoc2013-evolution-2e449b7753660adbb8614a22fdf38e693e91ae86.tar.xz
gsoc2013-evolution-2e449b7753660adbb8614a22fdf38e693e91ae86.tar.zst
gsoc2013-evolution-2e449b7753660adbb8614a22fdf38e693e91ae86.zip
check the return value from e_cal_new_from_uri.
2003-12-17 Rodrigo Moya <rodrigo@ximian.com> * gui/gnome-cal.c (gnome_calendar_add_event_uri): check the return value from e_cal_new_from_uri. svn path=/trunk/; revision=23961
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/gui/gnome-cal.c3
2 files changed, 8 insertions, 0 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 5e855d4206..eea7db533c 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,10 @@
2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
+ * gui/gnome-cal.c (gnome_calendar_add_event_uri): check the return
+ value from e_cal_new_from_uri.
+
+2003-12-17 Rodrigo Moya <rodrigo@ximian.com>
+
* gui/alarm-notify/alarm-notify.c (alarm_notify_remove_calendar):
make sure we free the data stored in the hash table.
(alarm_notify_add_calendar): call alarm_queue_add_client, or we wont
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 2075f9e790..7c6e0366ae 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -2162,6 +2162,9 @@ gnome_calendar_add_event_uri (GnomeCalendar *gcal, const char *str_uri)
return TRUE;
client = e_cal_new_from_uri (str_uri, CALOBJ_TYPE_EVENT);
+ if (!client)
+ return FALSE;
+
g_hash_table_insert (priv->clients, g_strdup (str_uri), client);
priv->clients_list = g_list_prepend (priv->clients_list, client);