void SketchPlugin_MultiTranslation::execute()
{
if (!sketch()) {
- // it is possible, that
+ // it is possible, that this method is called before this feature has back reference to sketch
+ // in this case, the execute is performed after this is done
return;
}
for (; aUsedIter != isUsed.end(); aUsedIter++) {
if (!(*aUsedIter)) {
aRefListOfShapes->remove(*anInitIter);
+ aRefListOfTranslated->remove(*aTargetIter++);
for (int i = 0; i < aCurrentNbCopies && aTargetIter != aTargetList.end(); i++, aTargetIter++) {
aRefListOfTranslated->remove(*aTargetIter);
// remove the corresponding feature from the sketch