fix Coverity issues

This commit is contained in:
wmayer
2016-08-22 15:02:18 +02:00
parent 14d3fd5ffc
commit 17de4e2efa
12 changed files with 111 additions and 100 deletions

View File

@@ -778,10 +778,11 @@ bool TaskDlgPipeParameters::accept()
//we need to add the copied features to the body after the command action, as otherwise freecad crashs unexplainable
for(auto obj : copies) {
if(pcActiveBody)
pcActiveBody->addFeature(obj);
else if (pcActivePart)
pcActivePart->addObject(obj);
//Dead code: pcActiveBody was previously used without checking for null, so it won't be null here either.
//if(pcActiveBody)
pcActiveBody->addFeature(obj);
//else if (pcActivePart)
// pcActivePart->addObject(obj);
}
}
catch (const Base::Exception& e) {