diff --git a/src/App/FeaturePython.h b/src/App/FeaturePython.h index d55fa3f8d5..ded1d5a233 100644 --- a/src/App/FeaturePython.h +++ b/src/App/FeaturePython.h @@ -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);