From 5c497c8f6cbeb89baa713723f7d9398926f84a1d Mon Sep 17 00:00:00 2001 From: Balleux Benjamin Date: Tue, 16 May 2017 15:01:55 +0200 Subject: [PATCH] Fix : Handle the case where the first representation element has 0 parent --- src/ifcconvert/ColladaSerializer.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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