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

@@ -239,8 +239,10 @@ void ViewProviderFillet::updateData(const App::Property* prop)
if (hist.size() != 1)
return;
Part::Fillet* objFill = dynamic_cast<Part::Fillet*>(getObject());
if (!objFill)
return;
Part::Feature* objBase = dynamic_cast<Part::Feature*>(objFill->Base.getValue());
if (objFill && objBase) {
if (objBase) {
const TopoDS_Shape& baseShape = objBase->Shape.getValue();
const TopoDS_Shape& fillShape = objFill->Shape.getValue();
@@ -342,8 +344,10 @@ void ViewProviderChamfer::updateData(const App::Property* prop)
if (hist.size() != 1)
return;
Part::Chamfer* objCham = dynamic_cast<Part::Chamfer*>(getObject());
if (!objCham)
return;
Part::Feature* objBase = dynamic_cast<Part::Feature*>(objCham->Base.getValue());
if (objCham && objBase) {
if (objBase) {
const TopoDS_Shape& baseShape = objBase->Shape.getValue();
const TopoDS_Shape& chamShape = objCham->Shape.getValue();