From b44b1cb8b0993ca4e4392562ea98b7478ddce30c Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 19 Jun 2024 11:56:45 +0200 Subject: [PATCH] Fix segfault on gcc #4832 --- src/ifcwrap/IfcGeomWrapper.i | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ifcwrap/IfcGeomWrapper.i b/src/ifcwrap/IfcGeomWrapper.i index a987a3c473..200ea45bd1 100644 --- a/src/ifcwrap/IfcGeomWrapper.i +++ b/src/ifcwrap/IfcGeomWrapper.i @@ -724,7 +724,7 @@ struct ShapeRTTI : public boost::static_visitor typename Schema::IfcProductRepresentation* prodrep = product->Representation(); typename Schema::IfcRepresentation::list::ptr reps = prodrep->Representations(); - typename Schema::IfcRepresentation* ifc_representation = representation->as(); + typename Schema::IfcRepresentation* ifc_representation = representation ? representation->as() : nullptr; if (!ifc_representation) { // First, try to find a representation based on the settings