Fix segfault on gcc #4832

This commit is contained in:
Thomas Krijnen
2024-06-19 11:56:45 +02:00
parent 6ad2bef05c
commit b44b1cb8b0
+1 -1
View File
@@ -724,7 +724,7 @@ struct ShapeRTTI : public boost::static_visitor<PyObject*>
typename Schema::IfcProductRepresentation* prodrep = product->Representation();
typename Schema::IfcRepresentation::list::ptr reps = prodrep->Representations();
typename Schema::IfcRepresentation* ifc_representation = representation->as<typename Schema::IfcRepresentation>();
typename Schema::IfcRepresentation* ifc_representation = representation ? representation->as<typename Schema::IfcRepresentation>() : nullptr;
if (!ifc_representation) {
// First, try to find a representation based on the settings