aboutsummaryrefslogtreecommitdiffstats
path: root/modules/calendar
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
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 'modules/calendar')
-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;