Skip to content

Commit

Permalink
fix crash when removing from document and accessing Python based feature
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Jan 13, 2019
1 parent b357d53 commit 1f5059b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/App/FeaturePython.h
Expand Up @@ -172,8 +172,12 @@ class FeaturePythonT : public FeatureT
/** @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);
Expand Down

0 comments on commit 1f5059b

Please sign in to comment.