Bug Fix : the previous commit made the program crash when an object has no parent

This commit is contained in:
Balleux Benjamin
2017-04-12 16:11:37 +02:00
parent 8312853b99
commit a02b189f69
+3 -2
View File
@@ -604,8 +604,9 @@ int main(int argc, char** argv)
//Debug
//if (parent_object != NULL) std::cout << '\n' << "obj " << geom_object->unique_id() << " parent = " << parent_object->name() << " of type " << parent_object->type() << '\n';
//else std::cout << "No parent found : " << geom_object->unique_id() << " of type : " << geom_object->type();
serializer->write(static_cast<const IfcGeom::TriangulationElement<real_t>*>(geom_object), parent_object);
if (parent_object != NULL) serializer->write(static_cast<const IfcGeom::TriangulationElement<real_t>*>(geom_object), parent_object);
else serializer->write(static_cast<const IfcGeom::TriangulationElement<real_t>*>(geom_object));
}
else
{