diff options
author | Milan Crha <mcrha@redhat.com> | 2009-03-05 00:03:06 +0800 |
---|---|---|
committer | Milan Crha <mcrha@src.gnome.org> | 2009-03-05 00:03:06 +0800 |
commit | 1353535f0bc0420886825fc8a4ae33b5235f1486 (patch) | |
tree | ab44fd448c553d6046429e5cfea27dcb9df1e722 /calendar | |
parent | 2880be8e8221d1e1ab02d03920c68057f1faa52b (diff) | |
download | gsoc2013-evolution-1353535f0bc0420886825fc8a4ae33b5235f1486.tar gsoc2013-evolution-1353535f0bc0420886825fc8a4ae33b5235f1486.tar.gz gsoc2013-evolution-1353535f0bc0420886825fc8a4ae33b5235f1486.tar.bz2 gsoc2013-evolution-1353535f0bc0420886825fc8a4ae33b5235f1486.tar.lz gsoc2013-evolution-1353535f0bc0420886825fc8a4ae33b5235f1486.tar.xz gsoc2013-evolution-1353535f0bc0420886825fc8a4ae33b5235f1486.tar.zst gsoc2013-evolution-1353535f0bc0420886825fc8a4ae33b5235f1486.zip |
** Fix for bug #573119
2009-03-04 Milan Crha <mcrha@redhat.com>
** Fix for bug #573119
* gui/dialogs/comp-editor.c: (set_attendees_for_delegation):
* gui/e-cal-popup.c: (is_delegated), (needs_to_accept):
Do not ask value of not included (NULL) parameters.
svn path=/trunk/; revision=37368
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 8 | ||||
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 5 | ||||
-rw-r--r-- | calendar/gui/e-cal-popup.c | 18 |
3 files changed, 22 insertions, 9 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index d20ae05e55..5d6e0903bb 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,5 +1,13 @@ 2009-03-04 Milan Crha <mcrha@redhat.com> + ** Fix for bug #573119 + + * gui/dialogs/comp-editor.c: (set_attendees_for_delegation): + * gui/e-cal-popup.c: (is_delegated), (needs_to_accept): + Do not ask value of not included (NULL) parameters. + +2009-03-04 Milan Crha <mcrha@redhat.com> + ** Fix for bug #573193 * gui/e-calendar-view.c: (error_response): Always destroy dialog. diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index dcdff0947e..61331e97f7 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -3015,10 +3015,11 @@ set_attendees_for_delegation (ECalComponent *comp, const char *address, ECalComp prop; prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) { const char *attendee = icalproperty_get_attendee (prop); - const char *delfrom; + const char *delfrom = NULL; param = icalproperty_get_first_parameter(prop, ICAL_DELEGATEDFROM_PARAMETER); - delfrom = icalparameter_get_delegatedfrom (param); + if (param) + delfrom = icalparameter_get_delegatedfrom (param); if (!(g_str_equal (itip_strip_mailto (attendee), address) || ((delfrom && *delfrom) && g_str_equal (itip_strip_mailto (delfrom), address)))) { diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c index 94e488ec25..b9f0d5f8d5 100644 --- a/calendar/gui/e-cal-popup.c +++ b/calendar/gui/e-cal-popup.c @@ -522,20 +522,23 @@ is_delegated (icalcomponent *icalcomp, char *user_email) if (prop) { param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDTO_PARAMETER); - delto = icalparameter_get_delegatedto (param); + if (param) + delto = icalparameter_get_delegatedto (param); } else return FALSE; prop = get_attendee_prop (icalcomp, itip_strip_mailto (delto)); if (prop) { - const char *delfrom; - icalparameter_partstat status; + const char *delfrom = NULL; + icalparameter_partstat status = ICAL_PARTSTAT_NONE; param = icalproperty_get_first_parameter (prop, ICAL_DELEGATEDFROM_PARAMETER); - delfrom = icalparameter_get_delegatedfrom (param); + if (param) + delfrom = icalparameter_get_delegatedfrom (param); param = icalproperty_get_first_parameter (prop, ICAL_PARTSTAT_PARAMETER); - status = icalparameter_get_partstat (param); + if (param) + status = icalparameter_get_partstat (param); if ((delfrom && *delfrom) && g_str_equal (itip_strip_mailto (delfrom), user_email) && status != ICAL_PARTSTAT_DECLINED) return TRUE; @@ -549,7 +552,7 @@ needs_to_accept (icalcomponent *icalcomp, char *user_email) { icalproperty *prop; icalparameter *param; - icalparameter_partstat status; + icalparameter_partstat status = ICAL_PARTSTAT_NONE; prop = get_attendee_prop (icalcomp, user_email); @@ -557,7 +560,8 @@ needs_to_accept (icalcomponent *icalcomp, char *user_email) if (!prop) return TRUE; param = icalproperty_get_first_parameter (prop, ICAL_PARTSTAT_PARAMETER); - status = icalparameter_get_partstat (param); + if (param) + status = icalparameter_get_partstat (param); if (status == ICAL_PARTSTAT_ACCEPTED || status == ICAL_PARTSTAT_TENTATIVE) return FALSE; |