Skip to content

Commit c0c6a96

Browse files
committed
BUG: Fixing Windows SEGFAULT while running tests
1 parent a541fff commit c0c6a96

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/MinimalPathTest.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int ReadPathFile( const char * PathFilename, typename PathFilterType::Pointer pa
6060
// Path: [272.00, 128.00] [274.00, 268.00]
6161
typedef itk::Point< double, VDimension > PointType;
6262
typedef itk::SpeedFunctionPathInformation<PointType> PathInfoType;
63-
typename PathInfoType::Pointer info = PathInfoType::New();
63+
6464
// NOTE: No checking is done on the path file: the user must ensure it is valid!!!
6565
std::string filename = PathFilename;
6666
if ( !itksys::SystemTools::FileIsFullPath(PathFilename) )
@@ -84,7 +84,8 @@ int ReadPathFile( const char * PathFilename, typename PathFilterType::Pointer pa
8484
while ( itksys::SystemTools::GetLineFromStream(file, line, &has_newline) )
8585
{
8686
if (has_newline)
87-
{
87+
{
88+
typename PathInfoType::Pointer info = PathInfoType::New();
8889
itksys::SystemTools::ReplaceString( line, "Path: ", "" );
8990
itksys::SystemTools::ReplaceString( line, " ", "" );
9091
itksys::SystemTools::ReplaceString( line, "[", "" );

0 commit comments

Comments
 (0)