PVS: V522 There might be dereferencing of a potential null pointer
This commit is contained in:
@@ -401,10 +401,9 @@ bool ShapeExtractor::isDraftPoint(App::DocumentObject* obj)
|
||||
// Base::Console().Message("SE::isDraftPoint()\n");
|
||||
bool result = false;
|
||||
//if the docObj doesn't have a Proxy property, it definitely isn't a Draft point
|
||||
App::Property* proxy = obj->getPropertyByName("Proxy");
|
||||
App::PropertyPythonObject* proxy = dynamic_cast<App::PropertyPythonObject*>(obj->getPropertyByName("Proxy"));
|
||||
if (proxy != nullptr) {
|
||||
App::PropertyPythonObject* proxyPy = dynamic_cast<App::PropertyPythonObject*>(proxy);
|
||||
std::string pp = proxyPy->toString();
|
||||
std::string pp = proxy->toString();
|
||||
// Base::Console().Message("SE::isDraftPoint - pp: %s\n", pp.c_str());
|
||||
if (pp.find("Point") != std::string::npos) {
|
||||
result = true;
|
||||
|
||||
Reference in New Issue
Block a user