diff --git a/ical/Alarm.cpp b/ical/Alarm.cpp index 9c0e645..f464c24 100644 --- a/ical/Alarm.cpp +++ b/ical/Alarm.cpp @@ -18,8 +18,10 @@ namespace ical { } void Alarm::parse_description(icalcomponent* alarm_component) { - // TODO Error Handling - description = icalproperty_get_value_as_string(icalcomponent_get_first_property(alarm_component, ICAL_DESCRIPTION_PROPERTY)); + icalproperty* description_property = icalcomponent_get_first_property(alarm_component, ICAL_DESCRIPTION_PROPERTY); + if(description_property != 0) { + description = icalproperty_get_value_as_string(description_property); + } } void Alarm::parse_trigger(icalcomponent* alarm_component) {