[evolution/express] Bug #601551 - [PST] evolution crashed with SIGSEGV



commit 35b20d88987f0bbc69806baa4bae10192d833e35
Author: Milan Crha <mcrha redhat com>
Date:   Wed Feb 24 18:00:27 2010 +0100

    Bug #601551 - [PST] evolution crashed with SIGSEGV

 plugins/pst-import/pst-importer.c |   14 +++++++++++---
 1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index 9662cac..7d28680 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -579,19 +579,19 @@ pst_process_item (PstImporter *m, pst_desc_tree *d_ptr)
 				pst_process_contact (m, item);
 			}
 
-		} else if (item->type == PST_TYPE_APPOINTMENT) {
+		} else if (item->type == PST_TYPE_APPOINTMENT && item->appointment) {
 
 			if (m->calendar && GPOINTER_TO_INT (g_datalist_get_data (&m->target->data, "pst-do-appt"))) {
 				pst_process_appointment (m, item);
 			}
 
-		} else if (item->type == PST_TYPE_TASK) {
+		} else if (item->type == PST_TYPE_TASK && item->appointment) {
 
 			if (m->tasks && GPOINTER_TO_INT (g_datalist_get_data (&m->target->data, "pst-do-task"))) {
 				pst_process_task (m, item);
 			}
 
-		} else if (item->type == PST_TYPE_JOURNAL) {
+		} else if (item->type == PST_TYPE_JOURNAL && item->appointment) {
 
 			if (m->journal && GPOINTER_TO_INT (g_datalist_get_data (&m->target->data, "pst-do-journal"))) {
 				pst_process_journal (m, item);
@@ -1283,6 +1283,8 @@ fill_calcomponent (PstImporter *m, pst_item *item, ECalComponent *ec, const gcha
 	a = item->appointment;
 	e = item->email;
 
+	g_return_if_fail (item->appointment != NULL);
+
 	if (item->create_date) {
 		struct icaltimetype tt;
 		tt = get_ical_date (item->create_date, FALSE);
@@ -1432,6 +1434,8 @@ pst_process_appointment (PstImporter *m, pst_item *item)
 {
 	ECalComponent *ec;
 
+	g_return_if_fail (item->appointment != NULL);
+
 	ec = e_cal_component_new ();
 	e_cal_component_set_new_vtype (ec, E_CAL_COMPONENT_EVENT);
 
@@ -1452,6 +1456,8 @@ pst_process_task (PstImporter *m, pst_item *item)
 {
 	ECalComponent *ec;
 
+	g_return_if_fail (item->appointment != NULL);
+
 	ec = e_cal_component_new ();
 	e_cal_component_set_new_vtype (ec, E_CAL_COMPONENT_TODO);
 
@@ -1474,6 +1480,8 @@ pst_process_journal (PstImporter *m, pst_item *item)
 {
 	ECalComponent *ec;
 
+	g_return_if_fail (item->appointment != NULL);
+
 	/*j = item->journal;*/
 	ec = e_cal_component_new ();
 	e_cal_component_set_new_vtype (ec, E_CAL_COMPONENT_JOURNAL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]