diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 62ba88f7b..3fcbeaa81 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -796,7 +796,7 @@ void StdCmdToggleObjects::activated(int iMsg) (App::DocumentObject::getClassTypeId()); for (std::vector::const_iterator it=obj.begin();it!=obj.end();++it) { - if (doc && doc->isShow((*it)->getNameInDocument())) + if (doc->isShow((*it)->getNameInDocument())) doCommand(Gui,"Gui.getDocument(\"%s\").getObject(\"%s\").Visibility=False" , app->getName(), (*it)->getNameInDocument()); else