std::set<ConstraintPtr>::iterator aCIter = aConstraints.begin();
for (; aCIter != aConstraints.end(); aCIter++) {
ConstraintConstraintMap::iterator aSolConIter = myConstraints.find(*aCIter);
- if (aSolConIter == myConstraints.end())
+ if (aSolConIter == myConstraints.end() || !aSolConIter->first->data() ||
+ !aSolConIter->first->data()->isValid())
continue;
myFeatureStorage->changeFeature(theFeature, aSolConIter->first);
aSolConIter->second->addFeature(theFeature);