TechDraw: Fix double free when resetting line formats

This commit is contained in:
j-hap
2025-03-02 18:40:33 +01:00
parent bec9c2e405
commit 80b0c72829

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