Fix segfault when appending an ExtrusionPath::Collection to another Collection

This commit is contained in:
Alessandro Ranellucci 2013-08-31 01:23:47 +02:00
parent dd70f6be2f
commit 1741301973

View File

@ -56,7 +56,7 @@ ExtrusionEntityCollection::append(...)
} else if (ExtrusionLoop* loop = dynamic_cast<ExtrusionLoop*>(entity)) { } else if (ExtrusionLoop* loop = dynamic_cast<ExtrusionLoop*>(entity)) {
THIS->entities.push_back( new ExtrusionLoop(*loop) ); THIS->entities.push_back( new ExtrusionLoop(*loop) );
} else { } else {
THIS->entities.push_back( new ExtrusionEntityCollection(*(ExtrusionEntityCollection*)entity) ); THIS->entities.push_back( (*(ExtrusionEntityCollection*)entity).clone() );
} }
} }