PVS: V595 A pointer was utilized before it was verified against nullptr
This commit is contained in:
@@ -318,9 +318,7 @@ void CmdTechDrawView::activated(int iMsg)
|
||||
}
|
||||
//not a Link and not null. assume to be drawable. Undrawables will be
|
||||
// skipped later.
|
||||
if (obj != nullptr) {
|
||||
shapes.push_back(obj);
|
||||
}
|
||||
shapes.push_back(obj);
|
||||
if(partObj != nullptr) {
|
||||
continue;
|
||||
}
|
||||
@@ -576,9 +574,7 @@ void CmdTechDrawProjectionGroup::activated(int iMsg)
|
||||
}
|
||||
//not a Link and not null. assume to be drawable. Undrawables will be
|
||||
// skipped later.
|
||||
if (obj != nullptr) {
|
||||
shapes.push_back(obj);
|
||||
}
|
||||
shapes.push_back(obj);
|
||||
if(partObj != nullptr) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -289,8 +289,8 @@ void QGEPath::clearMarkers()
|
||||
return;
|
||||
}
|
||||
for (auto& m: m_markers) {
|
||||
m->hide();
|
||||
if (m != nullptr) {
|
||||
m->hide();
|
||||
QGraphicsScene* s = m->scene();
|
||||
if (s != nullptr) {
|
||||
s->removeItem(m); //should this be setParentItem(nullptr) instead??
|
||||
|
||||
Reference in New Issue
Block a user