App: issue #6672: PartDesign SubShapeBinder: crash and other issues when manually editing Support
This change only fixes the crash as described in procedure A at https://github.com/FreeCAD/FreeCAD/issues/6672
This commit is contained in:
@@ -243,10 +243,14 @@ bool DynamicProperty::removeDynamicProperty(const char* name)
|
||||
throw Base::RuntimeError("property is not dynamic");
|
||||
Property *prop = it->property;
|
||||
GetApplication().signalRemoveDynamicProperty(*prop);
|
||||
Property::destroy(prop);
|
||||
index.erase(it);
|
||||
// memory of myName has been freed
|
||||
prop->myName = nullptr;
|
||||
|
||||
// Handle possible recursive calls of removeDynamicProperty
|
||||
if (prop->myName) {
|
||||
Property::destroy(prop);
|
||||
index.erase(it);
|
||||
// memory of myName has been freed
|
||||
prop->myName = nullptr;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user