+ check for null pointer when trying to get associated view provider of a document object

This commit is contained in:
wmayer 2015-08-12 17:44:29 +02:00
parent c79662e35b
commit ab8d8a04ad

View File

@ -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) {