From 1c6ff971892638d068e73e0a5206a60bdae732a1 Mon Sep 17 00:00:00 2001 From: Rodrigo Moya Date: Tue, 1 Feb 2005 11:46:33 +0000 Subject: only add real data to the array. 2005-02-01 Rodrigo Moya * gui/calendar-commands.c (calendar_control_sensitize_calendar_commands): only add real data to the array. svn path=/trunk/; revision=28658 --- calendar/ChangeLog | 6 ++++++ calendar/gui/calendar-commands.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index ed1679d55a..ecce859b31 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2005-02-01 Rodrigo Moya + + * gui/calendar-commands.c + (calendar_control_sensitize_calendar_commands): only add real data + to the array. + 2005-02-01 JP Rosevear Fixes #71944 diff --git a/calendar/gui/calendar-commands.c b/calendar/gui/calendar-commands.c index e4167df141..8cf9849f7d 100644 --- a/calendar/gui/calendar-commands.c +++ b/calendar/gui/calendar-commands.c @@ -446,8 +446,8 @@ calendar_control_sensitize_calendar_commands (BonoboControl *control, GnomeCalen selected = e_calendar_view_get_selected_events((ECalendarView *)view); for (l=selected;l;l=g_list_next(l)) { ECalendarViewEvent *event = l->data; - if (event) - g_ptr_array_add(events, e_cal_model_copy_component_data(event->comp_data)); + if (event && event->comp_data) + g_ptr_array_add (events, e_cal_model_copy_component_data(event->comp_data)); } g_list_free(selected); -- cgit