Commit b2454549 authored by David Jarvie's avatar David Jarvie

Bug 300376: fix crash when saving new alarm

parent c8998432
......@@ -127,7 +127,8 @@ bool CollectionMimeTypeFilterModel::filterAcceptsRow(int sourceRow, const QModel
return false;
if ((mWritableOnly || mEnabledOnly) && !collection.hasAttribute<CollectionAttribute>())
return false;
if (mWritableOnly && collection.attribute<CompatibilityAttribute>()->compatibility() != KACalendar::Current)
if (mWritableOnly && (!collection.hasAttribute<CompatibilityAttribute>()
|| collection.attribute<CompatibilityAttribute>()->compatibility() != KACalendar::Current))
return false;
if (mEnabledOnly && !collection.attribute<CollectionAttribute>()->isEnabled(mAlarmType))
return false;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment