fix coverity issues

This commit is contained in:
wmayer
2016-10-08 17:43:30 +02:00
parent 4e0323565d
commit 677ec6cd30
12 changed files with 54 additions and 48 deletions

View File

@@ -73,6 +73,7 @@ bool GUIApplication::notify (QObject * receiver, QEvent * event)
if (!receiver) {
Base::Console().Log("GUIApplication::notify: Unexpected null receiver, event type: %d\n",
(int)event->type());
return false;
}
try {
if (event->type() == Spaceball::ButtonEvent::ButtonEventType ||

View File

@@ -38,7 +38,6 @@
#include "Document.h"
#include "Selection.h"
#include "SelectionFilter.h"
#include "SelectionObjectPy.h"
#include "View3DInventor.h"
#include <Base/Exception.h>
#include <Base/Console.h>
@@ -47,6 +46,7 @@
#include <App/Document.h>
#include <App/DocumentObject.h>
#include <App/DocumentObjectPy.h>
#include <Gui/SelectionObjectPy.h>
#include "MainWindow.h"
@@ -981,6 +981,7 @@ SelectionSingleton::SelectionSingleton()
hz = 0;
ActiveGate = 0;
App::GetApplication().signalDeletedObject.connect(boost::bind(&Gui::SelectionSingleton::slotDeletedObject, this, _1));
CurrentPreselection.Type = SelectionChanges::ClrSelection;
CurrentPreselection.pDocName = 0;
CurrentPreselection.pObjectName = 0;
CurrentPreselection.pSubName = 0;

View File

@@ -841,9 +841,10 @@ void View3DInventorViewer::setNavigationType(Base::Type t)
}
NavigationStyle* ns = static_cast<NavigationStyle*>(base);
ns->operator = (*this->navigation);
if (this->navigation)
if (this->navigation) {
ns->operator = (*this->navigation);
delete this->navigation;
}
this->navigation = ns;
this->navigation->setViewer(this);
}