Prevent GetNodesFromGraphNodeIDs() from adding null pointers to the list that it returns.
Signed-off-by: Andre Mitchell <andre.mitchell@bytesofpi.com>
This commit is contained in:
@@ -698,7 +698,10 @@ namespace GraphModelIntegration
|
||||
GraphModel::NodePtrList nodeList;
|
||||
for (auto nodeId : nodeIds)
|
||||
{
|
||||
nodeList.push_back(m_elementMap.Find<GraphModel::Node>(nodeId));
|
||||
if (GraphModel::NodePtr nodePtr = m_elementMap.Find<GraphModel::Node>(nodeId))
|
||||
{
|
||||
nodeList.push_back(nodePtr);
|
||||
}
|
||||
}
|
||||
|
||||
return nodeList;
|
||||
|
||||
Reference in New Issue
Block a user