aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-cal-shell-view-actions.c36
-rw-r--r--modules/calendar/e-cal-shell-view-private.c3
-rw-r--r--modules/calendar/e-cal-shell-view.c2
3 files changed, 38 insertions, 3 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;
diff --git a/modules/calendar/e-cal-shell-view-private.c b/modules/calendar/e-cal-shell-view-private.c
index 71db1236c1..a112c171b8 100644
--- a/modules/calendar/e-cal-shell-view-private.c
+++ b/modules/calendar/e-cal-shell-view-private.c
@@ -742,6 +742,9 @@ e_cal_shell_view_transfer_item_to (ECalShellView *cal_shell_view,
g_return_if_fail (event != NULL);
g_return_if_fail (E_IS_CAL (destination_client));
+ if (!is_comp_data_valid (event))
+ return;
+
icalcomp_event = event->comp_data->icalcomp;
uid = icalcomponent_get_uid (icalcomp_event);
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index a489fe59a7..36ee86354d 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -353,7 +353,7 @@ cal_shell_view_update_actions (EShellView *shell_view)
gboolean user_org = FALSE;
gboolean read_only = TRUE;
- if (!event || !event->comp_data)
+ if (!is_comp_data_valid (event))
continue;
client = event->comp_data->client;