aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/groupwise-features
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-05-14 05:49:58 +0800
committerMilan Crha <mcrha@redhat.com>2010-05-14 05:49:58 +0800
commit5a124a6add633ba4af8babc8de7a8a9b8058899e (patch)
tree9fd9c187c4ac640eeb10c8586c90c3b9c5ec7380 /plugins/groupwise-features
parentb936a2301feb69f420d930f8f74436dde35b9f04 (diff)
downloadgsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar.gz
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar.bz2
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar.lz
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar.xz
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar.zst
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.zip
Bug #607257 - Add checks for event->comp_data != NULL
Diffstat (limited to 'plugins/groupwise-features')
-rw-r--r--plugins/groupwise-features/gw-ui.c2
-rw-r--r--plugins/groupwise-features/process-meeting.c16
2 files changed, 14 insertions, 4 deletions
diff --git a/plugins/groupwise-features/gw-ui.c b/plugins/groupwise-features/gw-ui.c
index c1146ff4d1..41529b5d41 100644
--- a/plugins/groupwise-features/gw-ui.c
+++ b/plugins/groupwise-features/gw-ui.c
@@ -384,7 +384,7 @@ update_cal_entries_cb (EShellView *shell_view, gpointer user_data)
ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
const gchar *uri;
- uri = event->comp_data ? e_cal_get_uri (event->comp_data->client) : NULL;
+ uri = is_comp_data_valid (event) ? e_cal_get_uri (event->comp_data->client) : NULL;
if (uri && g_ascii_strncasecmp (uri, "groupwise://", 12) == 0) {
visible = e_cal_util_component_has_attendee (event->comp_data->icalcomp);
diff --git a/plugins/groupwise-features/process-meeting.c b/plugins/groupwise-features/process-meeting.c
index 5a2b55c2c9..3eb8d59424 100644
--- a/plugins/groupwise-features/process-meeting.c
+++ b/plugins/groupwise-features/process-meeting.c
@@ -144,13 +144,19 @@ process_meeting (ECalendarView *cal_view, icalparameter_partstat status)
selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- ECalComponent *comp = e_cal_component_new ();
- ReceiveData *r_data = g_new0 (ReceiveData, 1);
+ ECalComponent *comp;
+ ReceiveData *r_data;
gboolean recurring = FALSE;
GThread *thread = NULL;
GError *error = NULL;
gchar *address = NULL;
+ if (!is_comp_data_valid (event))
+ return;
+
+ comp = e_cal_component_new ();
+ r_data = g_new0 (ReceiveData, 1);
+
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
address = itip_get_comp_attendee (comp, event->comp_data->client);
@@ -373,7 +379,7 @@ gw_resend_meeting_cb (GtkAction *action, EShellView *shell_view)
selected = e_calendar_view_get_selected_events (cal_view);
if (selected) {
ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- ECalComponent *comp = e_cal_component_new ();
+ ECalComponent *comp;
ECalComponent *new_comp = NULL;
gboolean recurring = FALSE;
CalObjModType mod = CALOBJ_MOD_THIS;
@@ -383,6 +389,10 @@ gw_resend_meeting_cb (GtkAction *action, EShellView *shell_view)
/* inserting the boolean to share the code between resend and retract */
gboolean resend = TRUE;
+ if (!is_comp_data_valid (event))
+ return;
+
+ comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp))
recurring = TRUE;