aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view.c
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-09-03 02:44:00 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-09-03 02:44:00 +0800
commitf8374109ac06f8c0528dcf27f214f26c5d2aaf8d (patch)
tree6f433c6f52d6f71cc54e4852c0866c8982e1ecb8 /calendar/gui/e-day-view.c
parent8c122d342656c0cad8babf4cb26796256b636fb4 (diff)
downloadgsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.gz
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.bz2
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.lz
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.xz
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.tar.zst
gsoc2013-evolution-f8374109ac06f8c0528dcf27f214f26c5d2aaf8d.zip
** Fix for bug #471791 (Move away from asserts to g_ret*)
svn path=/trunk/; revision=34156
Diffstat (limited to 'calendar/gui/e-day-view.c')
-rw-r--r--calendar/gui/e-day-view.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 044686db7d..7aeed7e4eb 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -544,7 +544,7 @@ update_row (EDayView *day_view, int row)
model = e_calendar_view_get_model (E_CALENDAR_VIEW (day_view));
comp_data = e_cal_model_get_component_at (model, row);
- g_assert (comp_data != NULL);
+ g_return_if_fail (comp_data != NULL);
process_component (day_view, comp_data);
gtk_widget_queue_draw (day_view->top_canvas);
@@ -582,7 +582,10 @@ model_rows_inserted_cb (ETableModel *etm, int row, int count, gpointer user_data
ECalModelComponent *comp_data;
comp_data = e_cal_model_get_component_at (model, row + i);
- g_assert (comp_data != NULL);
+ if (comp_data == NULL) {
+ g_warning ("comp_data is NULL\n");
+ continue;
+ }
process_component (day_view, comp_data);
}
@@ -3488,8 +3491,7 @@ e_day_view_convert_event_coords (EDayView *day_view,
break;
default:
/* Shouldn't get here. */
- g_assert_not_reached ();
- return FALSE;
+ g_return_val_if_reached (FALSE);
}
while (event_window && event_window != window
@@ -4185,7 +4187,7 @@ e_day_view_update_query (EDayView *day_view)
ECalModelComponent *comp_data;
comp_data = e_cal_model_get_component_at (e_calendar_view_get_model (E_CALENDAR_VIEW (day_view)), r);
- g_assert (comp_data != NULL);
+ g_return_if_fail (comp_data != NULL);
process_component (day_view, comp_data);
}
}
@@ -7010,7 +7012,7 @@ cancel_editing (EDayView *day_view)
day = day_view->editing_event_day;
event_num = day_view->editing_event_num;
- g_assert (day != -1);
+ g_return_if_fail (day != -1);
if (day == E_DAY_VIEW_LONG_EVENT)
event = &g_array_index (day_view->long_events, EDayViewEvent, event_num);
@@ -7613,7 +7615,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
g_object_get (G_OBJECT (event->canvas_item),
"text", &text,
NULL);
- g_assert (text != NULL);
+ g_return_if_fail (text != NULL);
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
@@ -7770,7 +7772,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
g_object_get (G_OBJECT (event->canvas_item),
"text", &text,
NULL);
- g_assert (text != NULL);
+ g_return_if_fail (text != NULL);
comp = e_cal_component_new ();
e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));