From ab8d8a04ad35d2391bee85d22bbfff89d4e14656 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 12 Aug 2015 17:44:29 +0200 Subject: [PATCH] + check for null pointer when trying to get associated view provider of a document object --- src/Gui/Application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 73e3994a8..9fca97297 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -860,7 +860,7 @@ void Application::hideViewProvider(const App::DocumentObject* obj) Gui::ViewProvider* Application::getViewProvider(const App::DocumentObject* obj) const { - App::Document* doc = obj->getDocument(); + App::Document* doc = obj ? obj->getDocument() : 0; if (doc) { Gui::Document* gui = getDocument(doc); if (gui) {