Merge pull request #19946 from j-hap/fix_double_free

TechDraw: Fix double free when resetting line formats
This commit is contained in:
Chris Hennes
2025-03-11 20:29:06 +00:00
committed by GitHub

View File

@@ -594,12 +594,8 @@ void CosmeticExtension::removeCenterLine(const std::vector<std::string>& delTags
void CosmeticExtension::clearGeomFormats()
{
std::vector<GeomFormat*> noFormats;
std::vector<GeomFormat*> fmts = GeomFormats.getValues();
GeomFormats.setValues(noFormats);
for (auto& f : fmts) {
delete f;
}
// setValues takes care of deletion of old entries as well
GeomFormats.setValues({});
}
//returns unique GF id