PVS: V1004 A pointer was used unsafely after it was verified against nullptr
This commit is contained in:
@@ -1236,8 +1236,10 @@ void PartGui::DimensionAngular::setupDimension()
|
||||
|
||||
//text
|
||||
SoSeparator *textSep = static_cast<SoSeparator *>(getPart("textSep", true));
|
||||
if (textSep)
|
||||
textSep->addChild(material);
|
||||
if (!textSep)
|
||||
return;
|
||||
|
||||
textSep->addChild(material);
|
||||
|
||||
SoCalculator *textVecCalc = new SoCalculator();
|
||||
textVecCalc->a.connectFrom(&angle);
|
||||
|
||||
@@ -1195,6 +1195,7 @@ int DrawViewPart::add1CVToGV(std::string tag)
|
||||
TechDraw::CosmeticVertex* cv = getCosmeticVertex(tag);
|
||||
if (cv == nullptr) {
|
||||
Base::Console().Message("DVP::add1CVToGV 2 - cv %s not found\n", tag.c_str());
|
||||
return 0;
|
||||
}
|
||||
int iGV = geometryObject->addCosmeticVertex(cv->scaled(getScale()),
|
||||
cv->getTagAsString());
|
||||
|
||||
@@ -154,11 +154,12 @@ void TaskProjGroup::saveGroupState()
|
||||
m_saveSpacingY = multiView->spacingY.getValue();
|
||||
DrawProjGroupItem* anchor = multiView->getAnchor();
|
||||
m_saveDirection = anchor->Direction.getValue();
|
||||
}
|
||||
for( const auto it : multiView->Views.getValues() ) {
|
||||
auto view( dynamic_cast<DrawProjGroupItem *>(it) );
|
||||
if (view != nullptr) {
|
||||
m_saveViewNames.push_back(view->Type.getValueAsString());
|
||||
|
||||
for( const auto it : multiView->Views.getValues() ) {
|
||||
auto view( dynamic_cast<DrawProjGroupItem *>(it) );
|
||||
if (view != nullptr) {
|
||||
m_saveViewNames.push_back(view->Type.getValueAsString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user