Skip to content

Commit

Permalink
Add null ptr check to deleteChain
Browse files Browse the repository at this point in the history
Refs #8360
  • Loading branch information
martyngigg committed Mar 14, 2014
1 parent b12e386 commit b59de9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Code/Mantid/Framework/Geometry/src/Math/Vertex2D.cpp
Expand Up @@ -16,10 +16,12 @@ namespace Mantid

/**
* Deletes all nodes in a chain
* @para node A node in the chain
* @para node A node in the chain. If NULL then nothing happens
*/
void Vertex2D::deleteChain(Vertex2D * node)
{
if(!node) return;

Vertex2D * head = node;
Vertex2D * next = node->next();
while(next != head)
Expand Down

0 comments on commit b59de9e

Please sign in to comment.