fix scan coverity issues: uncaught exception

This commit is contained in:
wmayer
2017-04-11 14:03:08 +02:00
parent ca343c43ab
commit c526c18b94
16 changed files with 140 additions and 99 deletions

View File

@@ -245,16 +245,16 @@ TaskBoxPrimitives::TaskBoxPrimitives(ViewProviderPrimitive* vp, QWidget* parent)
TaskBoxPrimitives::~TaskBoxPrimitives()
{
//hide the parts coordinate system axis for selection
PartDesign::Body * body = vp ? PartDesign::Body::findBodyOf(vp->getObject()) : 0;
if (body) {
try {
try {
PartDesign::Body * body = vp ? PartDesign::Body::findBodyOf(vp->getObject()) : 0;
if (body) {
App::Origin *origin = body->getOrigin();
Gui::ViewProviderOrigin* vpOrigin;
vpOrigin = static_cast<Gui::ViewProviderOrigin*>(Gui::Application::Instance->getViewProvider(origin));
vpOrigin->resetTemporaryVisibility();
} catch (const Base::Exception &ex) {
Base::Console().Error ("%s\n", ex.what () );
}
} catch (const Base::Exception &ex) {
Base::Console().Error ("%s\n", ex.what () );
}
}