diff --git a/src/ifcgeom/IfcGeomRenderStyles.cpp b/src/ifcgeom/IfcGeomRenderStyles.cpp index c47f10a236..09c211a58b 100644 --- a/src/ifcgeom/IfcGeomRenderStyles.cpp +++ b/src/ifcgeom/IfcGeomRenderStyles.cpp @@ -131,7 +131,8 @@ const IfcGeom::SurfaceStyle* IfcGeom::Kernel::get_style(const IfcSchema::IfcMate } } } - return 0; + IfcGeom::SurfaceStyle material_style = IfcGeom::SurfaceStyle(material->id(), material->Name()); + return &(style_cache[material->id()] = material_style); } static std::map default_materials;