From 0eb7967c4039f6ee4a7984866cdfe1dba0f1e48c Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 21 Jul 2020 14:33:54 +0200 Subject: [PATCH] Coverity: [skip ci] Dereference before null check Remove logically dead code because 'pcActiveBody' cannot be null at this stage --- src/Mod/PartDesign/Gui/Command.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Mod/PartDesign/Gui/Command.cpp b/src/Mod/PartDesign/Gui/Command.cpp index 39ca708272..1893706711 100644 --- a/src/Mod/PartDesign/Gui/Command.cpp +++ b/src/Mod/PartDesign/Gui/Command.cpp @@ -728,11 +728,8 @@ void CmdPartDesignNewSketch::activated(int iMsg) if ( ( geoGroup && geoGroup->hasObject ( plane, true ) ) || !App::GeoFeatureGroupExtension::getGroupOfObject ( plane ) ) { status.push_back ( PartDesignGui::TaskFeaturePick::otherPart ); - } else if (pcActiveBody) { + } else { status.push_back ( PartDesignGui::TaskFeaturePick::notInBody ); - } else { // if we are outside a body count it as valid - validPlaneCount++; - status.push_back(PartDesignGui::TaskFeaturePick::validFeature); } } }