fix crash when removing from document and accessing Python based feature
This commit is contained in:
@@ -172,8 +172,12 @@ public:
|
||||
/** @name Property serialization */
|
||||
//@{
|
||||
void Save (Base::Writer &writer) const {
|
||||
writer.ObjectName = this->getNameInDocument();
|
||||
props->Save(writer);
|
||||
const char* objname = this->getNameInDocument();
|
||||
// if null then it's not part of the document
|
||||
if (objname) {
|
||||
writer.ObjectName = objname;
|
||||
props->Save(writer);
|
||||
}
|
||||
}
|
||||
void Restore(Base::XMLReader &reader) {
|
||||
props->Restore(reader);
|
||||
|
||||
Reference in New Issue
Block a user