[evolution/gnome-2-28] Bug #601551 - [PST] evolution crashed with SIGSEGV
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-28] Bug #601551 - [PST] evolution crashed with SIGSEGV
- Date: Wed, 24 Feb 2010 17:02:27 +0000 (UTC)
commit 9720d79b7dcb67da007b1be9dd5368bd2cf0698b
Author: Milan Crha <mcrha redhat com>
Date: Wed Feb 24 18:02:06 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 3530b7c..6b82e50 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]