aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar/e-cal-shell-view-actions.c
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 /modules/calendar/e-cal-shell-view-actions.c
parentb936a2301feb69f420d930f8f74436dde35b9f04 (diff)
downloadgsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar.gz
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.tar.zst
gsoc2013-evolution-5a124a6add633ba4af8babc8de7a8a9b8058899e.zip
Bug #607257 - Add checks for event->comp_data != NULL
Diffstat (limited to 'modules/calendar/e-cal-shell-view-actions.c')
-rw-r--r--modules/calendar/e-cal-shell-view-actions.c36
1 files changed, 34 insertions, 2 deletions
diff --git a/modules/calendar/e-cal-shell-view-actions.c b/modules/calendar/e-cal-shell-view-actions.c
index 3251183000..d56107ac7a 100644
--- a/modules/calendar/e-cal-shell-view-actions.c
+++ b/modules/calendar/e-cal-shell-view-actions.c
@@ -512,7 +512,7 @@ action_event_copy_cb (GtkAction *action,
if (selected->data) {
ECalendarViewEvent *event = selected->data;
- if (event && event->comp_data && event->comp_data->client)
+ if (is_comp_data_valid (event) && event->comp_data->client)
source_source = e_cal_get_source (event->comp_data->client);
}
@@ -577,6 +577,10 @@ action_event_delegate_cb (GtkAction *action,
g_return_if_fail (g_list_length (selected) == 1);
event = selected->data;
+
+ if (!is_comp_data_valid (event))
+ return;
+
client = event->comp_data->client;
clone = icalcomponent_new_clone (event->comp_data->icalcomp);
@@ -707,6 +711,10 @@ action_event_forward_cb (GtkAction *action,
g_return_if_fail (g_list_length (selected) == 1);
event = selected->data;
+
+ if (!is_comp_data_valid (event))
+ return;
+
client = event->comp_data->client;
icalcomp = event->comp_data->icalcomp;
@@ -774,7 +782,7 @@ action_event_move_cb (GtkAction *action,
if (selected->data) {
ECalendarViewEvent *event = selected->data;
- if (event && event->comp_data && event->comp_data->client)
+ if (is_comp_data_valid (event) && event->comp_data->client)
source_source = e_cal_get_source (event->comp_data->client);
}
@@ -863,6 +871,10 @@ action_event_occurrence_movable_cb (GtkAction *action,
g_return_if_fail (g_list_length (selected) == 1);
event = selected->data;
+
+ if (!is_comp_data_valid (event))
+ return;
+
client = event->comp_data->client;
icalcomp = event->comp_data->icalcomp;
@@ -961,6 +973,10 @@ action_event_print_cb (GtkAction *action,
g_return_if_fail (g_list_length (selected) == 1);
event = selected->data;
+
+ if (!is_comp_data_valid (event))
+ return;
+
client = event->comp_data->client;
icalcomp = event->comp_data->icalcomp;
@@ -1000,6 +1016,10 @@ action_event_reply_cb (GtkAction *action,
g_return_if_fail (g_list_length (selected) == 1);
event = selected->data;
+
+ if (!is_comp_data_valid (event))
+ return;
+
client = event->comp_data->client;
icalcomp = event->comp_data->icalcomp;
@@ -1040,6 +1060,10 @@ action_event_reply_all_cb (GtkAction *action,
g_return_if_fail (g_list_length (selected) == 1);
event = selected->data;
+
+ if (!is_comp_data_valid (event))
+ return;
+
client = event->comp_data->client;
icalcomp = event->comp_data->icalcomp;
@@ -1090,6 +1114,10 @@ action_event_save_as_cb (GtkAction *action,
g_return_if_fail (g_list_length (selected) == 1);
event = selected->data;
+
+ if (!is_comp_data_valid (event))
+ return;
+
client = event->comp_data->client;
icalcomp = event->comp_data->icalcomp;
@@ -1148,6 +1176,10 @@ edit_event_as (ECalShellView *cal_shell_view, gboolean as_meeting)
g_return_if_fail (g_list_length (selected) == 1);
event = selected->data;
+
+ if (!is_comp_data_valid (event))
+ return;
+
client = event->comp_data->client;
icalcomp = event->comp_data->icalcomp;