diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-10-26 03:45:07 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-10-26 03:45:07 +0800 |
commit | 580b80f5b3e1a018fc4aeaa9b1b29c24e556a763 (patch) | |
tree | 0ef5beb5e419baa08e806b5227d227ffe8894db9 /my-evolution | |
parent | 33fc2cca986200618aed96743fe3aac8cbeb9948 (diff) | |
download | gsoc2013-evolution-580b80f5b3e1a018fc4aeaa9b1b29c24e556a763.tar.gz gsoc2013-evolution-580b80f5b3e1a018fc4aeaa9b1b29c24e556a763.tar.zst gsoc2013-evolution-580b80f5b3e1a018fc4aeaa9b1b29c24e556a763.zip |
It is possible for start_foo.value to be NULL after a cal to
2001-10-25 Jon Trowbridge <trow@ximian.com>
* e-summary-tasks.c (sort_uids): It is possible for
start_foo.value to be NULL after a cal to
cal_component_get_dtstart, so we need to check for this before
dereferencing it. (Bug #13259)
svn path=/trunk/; revision=14097
Diffstat (limited to 'my-evolution')
-rw-r--r-- | my-evolution/ChangeLog | 7 | ||||
-rw-r--r-- | my-evolution/e-summary-tasks.c | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/my-evolution/ChangeLog b/my-evolution/ChangeLog index cceecbda73..9204d054cd 100644 --- a/my-evolution/ChangeLog +++ b/my-evolution/ChangeLog @@ -1,3 +1,10 @@ +2001-10-25 Jon Trowbridge <trow@ximian.com> + + * e-summary-tasks.c (sort_uids): It is possible for + start_foo.value to be NULL after a cal to + cal_component_get_dtstart, so we need to check for this before + dereferencing it. (Bug #13259) + 2001-10-24 Iain Holmes <iain@ximian.com> * e-summary-mail.c (e_summary_mail_init): Don't free the mail part. diff --git a/my-evolution/e-summary-tasks.c b/my-evolution/e-summary-tasks.c index 1b2548ac57..57350c3bc2 100644 --- a/my-evolution/e-summary-tasks.c +++ b/my-evolution/e-summary-tasks.c @@ -151,7 +151,12 @@ sort_uids (gconstpointer a, cal_component_get_dtstart (comp_a, &start_a); cal_component_get_dtstart (comp_b, &start_b); - retval = icaltime_compare (*start_a.value, *start_b.value); + if (start_a.value == NULL || start_b.value == NULL) { + /* Try to do something reasonable if one or more of our .values is NULL */ + retval = (start_a.value ? 1 : 0) - (start_b.value ? 1 : 0); + } else { + retval = icaltime_compare (*start_a.value, *start_b.value); + } cal_component_free_datetime (&start_a); cal_component_free_datetime (&start_b); |