aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/cal-util/calobj.c
diff options
context:
space:
mode:
authorDamon Chaplin <damon@helixcode.com>2000-07-23 19:05:52 +0800
committerDamon Chaplin <damon@src.gnome.org>2000-07-23 19:05:52 +0800
commit96b11a7e66beadde0304fb5e402346e9b5bd7887 (patch)
tree91d418e3720791044b1f126ded364fc1268f26e7 /calendar/cal-util/calobj.c
parent171288a34a38acd6e8d26626235aa3ad65c61b05 (diff)
downloadgsoc2013-evolution-96b11a7e66beadde0304fb5e402346e9b5bd7887.tar
gsoc2013-evolution-96b11a7e66beadde0304fb5e402346e9b5bd7887.tar.gz
gsoc2013-evolution-96b11a7e66beadde0304fb5e402346e9b5bd7887.tar.bz2
gsoc2013-evolution-96b11a7e66beadde0304fb5e402346e9b5bd7887.tar.lz
gsoc2013-evolution-96b11a7e66beadde0304fb5e402346e9b5bd7887.tar.xz
gsoc2013-evolution-96b11a7e66beadde0304fb5e402346e9b5bd7887.tar.zst
gsoc2013-evolution-96b11a7e66beadde0304fb5e402346e9b5bd7887.zip
fixed it so it doesn't crash when a URL is loaded.
2000-07-23 Damon Chaplin <damon@helixcode.com> * cal-util/calobj.c (ical_object_create_from_vobject): fixed it so it doesn't crash when a URL is loaded. * cal-util/calobj.h: added a few more fields. svn path=/trunk/; revision=4280
Diffstat (limited to 'calendar/cal-util/calobj.c')
-rw-r--r--calendar/cal-util/calobj.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/calendar/cal-util/calobj.c b/calendar/cal-util/calobj.c
index 6402937938..0ede42ebc6 100644
--- a/calendar/cal-util/calobj.c
+++ b/calendar/cal-util/calobj.c
@@ -773,8 +773,18 @@ ical_object_create_from_vobject (VObject *o, const char *object_name)
/* url */
if (has (o, VCURLProp)){
- ical->url = g_strdup (str_val (vo));
- free (the_str);
+ /* There seems to be a problem with the URL property. For some
+ reason an empty property gets saved, vObjectUStringZValue
+ returns NULL and fakeCString crashes. So we check for NULL.
+ */
+ const wchar_t *zval;
+
+ zval = vObjectUStringZValue (o);
+ if (zval) {
+ the_str = fakeCString (zval);
+ ical->url = g_strdup (the_str);
+ free (the_str);
+ }
}
/* dalarm */