Commit 212afcfa authored by Marco Bubke's avatar Marco Bubke Committed by Kai Koehne
Browse files

Fix crash for reseting a property

Task-Number: BAUHAUS-606
parent 052e5fa6
......@@ -296,11 +296,13 @@ void QmlPropertyChangesObject::removeActionForProperty(const QString &propertyNa
actionIterator.remove();
}
QMutableListIterator<QDeclarativeSimpleAction> simpleActionIterator(statePrivate()->revertList);
while (simpleActionIterator.hasNext()) {
QDeclarativeSimpleAction &qmlSimpleAction = simpleActionIterator.next();
if (qmlSimpleAction.specifiedProperty == propertyName && qmlSimpleAction.specifiedObject == targetObject()) {
simpleActionIterator.remove();
if (statePrivate()) {
QMutableListIterator<QDeclarativeSimpleAction> simpleActionIterator(statePrivate()->revertList);
while (simpleActionIterator.hasNext()) {
QDeclarativeSimpleAction &qmlSimpleAction = simpleActionIterator.next();
if (qmlSimpleAction.specifiedProperty == propertyName && qmlSimpleAction.specifiedObject == targetObject()) {
simpleActionIterator.remove();
}
}
}
}
......
Supports Markdown
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