PVS: V595 A pointer was utilized before it was verified against nullptr

This commit is contained in:
wmayer
2020-07-17 17:03:50 +02:00
parent 93f61a3154
commit 473553a212
7 changed files with 27 additions and 24 deletions

View File

@@ -103,16 +103,16 @@ App::DocumentObjectExecReturn *DrawViewArch::execute(void)
}
App::DocumentObject* sourceObj = Source.getValue();
//if (sourceObj is not ArchSection) return
App::Property* proxy = sourceObj->getPropertyByName("Proxy");
if (proxy == nullptr) {
Base::Console().Error("DVA::execute - %s is not an ArchSection\n", sourceObj->Label.getValue());
//this is definitely not an ArchSection
return DrawView::execute();
}
if (sourceObj) {
std::string svgFrag;
//if (sourceObj is not ArchSection) return
App::Property* proxy = sourceObj->getPropertyByName("Proxy");
if (proxy == nullptr) {
Base::Console().Error("DVA::execute - %s is not an ArchSection\n", sourceObj->Label.getValue());
//this is definitely not an ArchSection
return DrawView::execute();
}
//std::string svgFrag;
std::string svgHead = getSVGHead();
std::string svgTail = getSVGTail();
std::string FeatName = getNameInDocument();