From 8c19a41f8998fc325b504488569401be9f66fc13 Mon Sep 17 00:00:00 2001 From: Leonardo Florez-Valencia Date: Mon, 10 Oct 2016 20:31:48 -0500 Subject: [PATCH] ... --- lib/fpa/Image/MinimumSpanningTree.hxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/fpa/Image/MinimumSpanningTree.hxx b/lib/fpa/Image/MinimumSpanningTree.hxx index 162526c..b99953b 100644 --- a/lib/fpa/Image/MinimumSpanningTree.hxx +++ b/lib/fpa/Image/MinimumSpanningTree.hxx @@ -24,8 +24,10 @@ template< unsigned int _VDim > void fpa::Image::MinimumSpanningTree< _VDim >:: GetPath( typename TPath::Pointer& path, const TVertex& a ) const { - this->Superclass::GetPath( path, a ); + if( path.GetPointer( ) == NULL ) + path = TPath::New( ); path->SetReferenceImage( this ); + this->Superclass::GetPath( path, a ); } // ------------------------------------------------------------------------- @@ -35,8 +37,10 @@ GetPath( typename TPath::Pointer& path, const TVertex& a, const TVertex& b ) const { - this->Superclass::GetPath( path, a, b ); + if( path.GetPointer( ) == NULL ) + path = TPath::New( ); path->SetReferenceImage( this ); + this->Superclass::GetPath( path, a, b ); } // ------------------------------------------------------------------------- -- 2.47.1