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/gui/calendar-commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'calendar/gui/calendar-commands.c') 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 v1.2.3