From bd8d2c529fe15e979dd2d33be2fa36c2358f0a96 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 4 Mar 2009 15:41:36 +0000 Subject: ** Fix for bug #573122 2009-03-04 Milan Crha ** Fix for bug #573122 * gui/dialogs/cal-prefs-dialog.c: (timezone_changed), (show_config): * gui/calendar-config.c: (calendar_config_get_icaltimezone): * gui/e-cal-model.c: (ecm_value_at): Do not pass NULL to icalcomponent_get_first_component. svn path=/trunk/; revision=37366 --- calendar/ChangeLog | 9 +++++++++ calendar/gui/calendar-config.c | 3 +-- calendar/gui/dialogs/cal-prefs-dialog.c | 4 ++-- calendar/gui/e-cal-model.c | 1 + 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 5ffddc0817..0273e73646 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2009-03-04 Milan Crha + + ** Fix for bug #573122 + + * gui/dialogs/cal-prefs-dialog.c: (timezone_changed), (show_config): + * gui/calendar-config.c: (calendar_config_get_icaltimezone): + * gui/e-cal-model.c: (ecm_value_at): + Do not pass NULL to icalcomponent_get_first_component. + 2009-02-25 Milan Crha ** Fix for bug #558366 diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index 1f18b94458..6a7cf94ee7 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -233,8 +233,7 @@ calendar_config_get_icaltimezone (void) zone = icaltimezone_get_builtin_timezone (location); icalcomp = icaltimezone_get_component (zone); - - if (!(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT))) { + if (!icalcomp || !(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT))) { g_free (location); return zone; } diff --git a/calendar/gui/dialogs/cal-prefs-dialog.c b/calendar/gui/dialogs/cal-prefs-dialog.c index 21ace5aea4..81e182ac54 100644 --- a/calendar/gui/dialogs/cal-prefs-dialog.c +++ b/calendar/gui/dialogs/cal-prefs-dialog.c @@ -124,7 +124,7 @@ timezone_changed (GtkWidget *widget, CalendarPrefsDialog *prefs) zone = e_timezone_entry_get_timezone (E_TIMEZONE_ENTRY (prefs->timezone)); icalcomp = icaltimezone_get_component (zone); - if (!(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT))) + if (!icalcomp || !(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT))) gtk_widget_set_sensitive ((GtkWidget *) prefs->daylight_saving, FALSE); else gtk_widget_set_sensitive ((GtkWidget *) prefs->daylight_saving, TRUE); @@ -644,7 +644,7 @@ show_config (CalendarPrefsDialog *prefs) g_free (location); icalcomp = icaltimezone_get_component (zone); - if (!(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT))) + if (!icalcomp || !(dl_comp = icalcomponent_get_first_component (icalcomp, ICAL_XDAYLIGHT_COMPONENT))) gtk_widget_set_sensitive ((GtkWidget *) prefs->daylight_saving, FALSE); else gtk_widget_set_sensitive ((GtkWidget *) prefs->daylight_saving, TRUE); diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 3c64e04296..4007e1236f 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -469,6 +469,7 @@ ecm_value_at (ETableModel *etm, int col, int row) comp_data = g_ptr_array_index (priv->objects, row); g_return_val_if_fail (comp_data != NULL, NULL); + g_return_val_if_fail (comp_data->icalcomp != NULL, NULL); switch (col) { case E_CAL_MODEL_FIELD_CATEGORIES : -- cgit v1.2.3