PVS: V1004 A pointer was used unsafely after it was verified against nullptr

This commit is contained in:
wmayer
2020-07-17 14:26:29 +02:00
parent 9ee3cd222b
commit 9424395afc
6 changed files with 14 additions and 11 deletions

View File

@@ -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());
}
}
}
}