diff options
author | Milan Crha <mcrha@redhat.com> | 2010-02-25 01:02:06 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2010-02-25 01:02:06 +0800 |
commit | 9720d79b7dcb67da007b1be9dd5368bd2cf0698b (patch) | |
tree | fe6ddc63c9463b12b8786109acdb4f1ab0184f33 | |
parent | fa52744585d31510f3e230b56f4dc504e60f99c0 (diff) | |
download | gsoc2013-evolution-9720d79b7dcb67da007b1be9dd5368bd2cf0698b.tar gsoc2013-evolution-9720d79b7dcb67da007b1be9dd5368bd2cf0698b.tar.gz gsoc2013-evolution-9720d79b7dcb67da007b1be9dd5368bd2cf0698b.tar.bz2 gsoc2013-evolution-9720d79b7dcb67da007b1be9dd5368bd2cf0698b.tar.lz gsoc2013-evolution-9720d79b7dcb67da007b1be9dd5368bd2cf0698b.tar.xz gsoc2013-evolution-9720d79b7dcb67da007b1be9dd5368bd2cf0698b.tar.zst gsoc2013-evolution-9720d79b7dcb67da007b1be9dd5368bd2cf0698b.zip |
Bug #601551 - [PST] evolution crashed with SIGSEGV
-rw-r--r-- | 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 3530b7c7c3..6b82e50b61 100644 --- a/plugins/pst-import/pst-importer.c +++ b/plugins/pst-import/pst-importer.c @@ -577,19 +577,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); @@ -1280,6 +1280,8 @@ fill_calcomponent (PstImporter *m, pst_item *item, ECalComponent *ec, const gcha struct icaltimetype tt_start, tt_end; ECalComponentDateTime dt_start, dt_end; + g_return_if_fail (item->appointment != NULL); + if (item->create_date) { struct icaltimetype tt; tt = get_ical_date (item->create_date, FALSE); @@ -1429,6 +1431,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); @@ -1449,6 +1453,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); @@ -1472,6 +1478,8 @@ pst_process_journal (PstImporter *m, pst_item *item) struct pst_item_journal *j; 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); |