fix various coverity issues

This commit is contained in:
wmayer
2017-09-15 11:48:38 +02:00
parent 5c1eadf947
commit 770c9ce095
17 changed files with 83 additions and 21 deletions

View File

@@ -63,10 +63,10 @@ PartDesign::Body *getBody(bool messageIfNot)
{
PartDesign::Body * activeBody = nullptr;
Gui::MDIView *activeView = Gui::Application::Instance->activeView();
bool singleBodyDocument = activeView->getAppDocument()->
countObjectsOfType(PartDesign::Body::getClassTypeId()) == 1;
if (activeView) {
bool singleBodyDocument = activeView->getAppDocument()->
countObjectsOfType(PartDesign::Body::getClassTypeId()) == 1;
if ( PartDesignGui::assureModernWorkflow ( activeView->getAppDocument() ) ) {
activeBody = activeView->getActiveObject<PartDesign::Body*>(PDBODYKEY);