summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Jarvie <djarvie@kde.org>2012-05-29 21:35:59 (GMT)
committerDavid Jarvie <djarvie@kde.org>2012-05-29 22:00:31 (GMT)
commit1f9a2a30176d8dfc4bcdd5aed97645ae02c1ac50 (patch)
tree0bc5b4cb36a28e488c3688f32deb0013c0aa7b1e
parent6ae61136553c4095b3d39145a2f000c0ea659c30 (diff)
Bug 300376: fix crash when saving new alarm
Backport of 98299ec1cd05336804e6f9f89cc944b2bbcab25e (master)
-rw-r--r--kalarm/collectionmodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kalarm/collectionmodel.cpp b/kalarm/collectionmodel.cpp
index f6c415f..e51dc90 100644
--- a/kalarm/collectionmodel.cpp
+++ b/kalarm/collectionmodel.cpp
@@ -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;