From 4b781d75b447d246f1da915dd4e636598638236a Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 11 Jan 2018 16:13:07 +0100 Subject: [PATCH] fix crash when querying information about an object that is not part of a document --- src/App/DocumentObject.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App/DocumentObject.cpp b/src/App/DocumentObject.cpp index aedcc38abe..f92103c0b0 100644 --- a/src/App/DocumentObject.cpp +++ b/src/App/DocumentObject.cpp @@ -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); }