fix crash when querying information about an object that is not part of a document

This commit is contained in:
wmayer
2018-01-11 16:13:07 +01:00
parent 861dc42d33
commit 4b781d75b4

View File

@@ -479,7 +479,8 @@ bool DocumentObject::isTouched() const
void DocumentObject::Save (Base::Writer &writer) const
{
writer.ObjectName = this->getNameInDocument();
if (this->getNameInDocument())
writer.ObjectName = this->getNameInDocument();
App::ExtensionContainer::Save(writer);
}