aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/event-page.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/dialogs/event-page.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/dialogs/event-page.c')
-rw-r--r--calendar/gui/dialogs/event-page.c22
1 files changed, 14 insertions, 8 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index c2aaf2b1cf..6f760ba096 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -1316,7 +1316,7 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
&start_tt.year,
&start_tt.month,
&start_tt.day);
- g_assert (start_date_set);
+ g_return_val_if_fail (start_date_set, FALSE);
if (!e_date_edit_date_is_valid (E_DATE_EDIT (priv->end_time))) {
comp_editor_page_display_validation_error (page, _("End date is wrong"), priv->end_time);
@@ -1326,7 +1326,7 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
&end_tt.year,
&end_tt.month,
&end_tt.day);
- g_assert (end_date_set);
+ g_return_val_if_fail (end_date_set, FALSE);
/* If the all_day toggle is set, we use DATE values for DTSTART and
DTEND. If not, we fetch the hour & minute from the widgets. */
@@ -1404,7 +1404,10 @@ event_page_fill_component (CompEditorPage *page, ECalComponent *comp)
icalproperty *icalprop;
alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->alarm_list_store, &iter);
- g_assert (alarm != NULL);
+ if (!alarm) {
+ g_warning ("alarm is NULL\n");
+ continue;
+ }
/* We set the description of the alarm if it's got
* the X-EVOLUTION-NEEDS-DESCRIPTION property.
@@ -2098,7 +2101,7 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day)
e_date_edit_get_time_of_day (E_DATE_EDIT (priv->start_time),
&start_tt.hour,
&start_tt.minute);
- g_assert (date_set);
+ g_return_if_fail (date_set);
date_set = e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
&end_tt.year,
@@ -2107,7 +2110,7 @@ event_page_set_all_day_event (EventPage *epage, gboolean all_day)
e_date_edit_get_time_of_day (E_DATE_EDIT (priv->end_time),
&end_tt.hour,
&end_tt.minute);
- g_assert (date_set);
+ g_return_if_fail (date_set);
/* TODO implement the for portion in end time selector */
gtk_widget_set_sensitive (priv->end_time_selector, !all_day);
@@ -2509,13 +2512,13 @@ times_updated (EventPage *epage, gboolean adjust_end_time)
&start_tt.year,
&start_tt.month,
&start_tt.day);
- g_assert (date_set);
+ g_return_if_fail (date_set);
date_set = e_date_edit_get_date (E_DATE_EDIT (priv->end_time),
&end_tt.year,
&end_tt.month,
&end_tt.day);
- g_assert (date_set);
+ g_return_if_fail (date_set);
if (all_day_event) {
/* All Day Events are simple. We just compare the dates and if
@@ -2905,7 +2908,10 @@ alarm_custom_clicked_cb (GtkWidget *widget, gpointer data)
ECalComponentAlarm *alarm;
alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (priv->alarm_list_store, &iter);
- g_assert (alarm != NULL);
+ if (alarm == NULL) {
+ g_warning ("alarm is NULL\n");
+ continue;
+ }
e_alarm_list_append (temp_list_store, NULL, alarm);
}