+ check for null pointer when trying to get associated view provider of a document object
This commit is contained in:
parent
c79662e35b
commit
ab8d8a04ad
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user