diff --git a/src/ifcgeom/mapping/IfcGradientCurve.cpp b/src/ifcgeom/mapping/IfcGradientCurve.cpp index 85fa6f10af..a01d42f488 100644 --- a/src/ifcgeom/mapping/IfcGradientCurve.cpp +++ b/src/ifcgeom/mapping/IfcGradientCurve.cpp @@ -24,7 +24,10 @@ using namespace ifcopenshell::geometry; #ifdef SCHEMA_HAS_IfcGradientCurve taxonomy::ptr mapping::map_impl(const IfcSchema::IfcGradientCurve* inst) { - auto horizontal = taxonomy::cast(map(inst->BaseCurve())); + if (!inst->BaseCurve()->as()) + Logger::Warning("Expected IfcGradientCurve.BaseCurve to be IfcCompositeCurve", inst); // CT 4.1.7.1.1.2 + + auto horizontal = taxonomy::cast(map(inst->BaseCurve())); auto vertical = taxonomy::make(); auto segments = inst->Segments();