diff --git a/src/ifcconvert/ColladaSerializer.cpp b/src/ifcconvert/ColladaSerializer.cpp index ae0200b698..413479140d 100644 --- a/src/ifcconvert/ColladaSerializer.cpp +++ b/src/ifcconvert/ColladaSerializer.cpp @@ -594,6 +594,10 @@ void ColladaSerializer::ColladaExporter::endDocument() { { unsigned parentsNumber = it->parents.size(); bool finished = false; + + // If we have no parent in the stack and the object has no parent, nothing to do : skip the loop + if (parentsNumber == 0 && serializer->parentStackId.size() == 0) { finished = true; } + while (!finished) { // If we need to add a parent