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
This commit is contained in:
Jon Trowbridge
2001-10-25 19:45:07 +00:00
committed by Jon Trowbridge
parent 33fc2cca98
commit 580b80f5b3
2 changed files with 13 additions and 1 deletions

View File

@ -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.

View File

@ -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);