// text expressions could block setValue of some attributes
SketchPlugin_Tools::clearExpressions(aNewFeature);
// Set copy attribute
- aNewFeature->data()->boolean(SketchPlugin_SketchEntity::COPY_ID())->setValue(theIsCopy);
+ AttributeBooleanPtr anAttr = aNewFeature->data()->boolean(SketchPlugin_SketchEntity::COPY_ID());
+ if(anAttr.get()) {
+ anAttr->setValue(theIsCopy);
+ }
return aNewFeature;
}