From 0afb17ac20b4998a73e5f8a3b11e5ef807fb6179 Mon Sep 17 00:00:00 2001 From: wmayer Date: Thu, 26 Sep 2013 17:43:27 +0200 Subject: [PATCH] +Fix crash when loading object without view provider --- src/Gui/Document.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index e89cc6ffb0..c5194a2770 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -681,7 +681,7 @@ void Document::RestoreDocFile(Base::Reader &reader) ViewProvider* pObj = getViewProviderByName(name.c_str()); if (pObj) // check if this feature has been registered pObj->Restore(xmlReader); - if (expanded) { + if (pObj && expanded) { Gui::ViewProviderDocumentObject* vp = static_cast(pObj); this->signalExpandObject(*vp, Gui::Expand); }