Browse Source

fixed error handling for alarm description parsing

main
Stefan Pranger 3 years ago
parent
commit
f154bf98a0
  1. 6
      ical/Alarm.cpp

6
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) {

Loading…
Cancel
Save