Commit 4323faa2 authored by Gaetano Raffaele's avatar Gaetano Raffaele
Browse files

Neighbor::getRegion Naive debug: check null pointer.

parent b6625040
......@@ -1052,9 +1052,12 @@ void RemoveEdgeToUnstableNode(typename TSegmenter::NodePointerType nodePtr)
for(auto& edg : nodePtr->m_Edges)
{
auto nodeNeighbor = edg.GetRegion();
auto EdgeToNode = grm::GraphOperations<TSegmenter>::FindEdge(nodeNeighbor, nodePtr);
assert(EdgeToNode != nodeNeighbor->m_Edges.end());
nodeNeighbor->m_Edges.erase(EdgeToNode);
//RAFGAET : Naive debug, do not process if NULL pointer
if (nodeNeighbor) { //added
auto EdgeToNode = grm::GraphOperations<TSegmenter>::FindEdge(nodeNeighbor, nodePtr);
assert(EdgeToNode != nodeNeighbor->m_Edges.end());
nodeNeighbor->m_Edges.erase(EdgeToNode);
} //added
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment