diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx index 02ba96399ebaeacb2139fbae8992e4f351b036bf..c58c27f748ec02e750a3f4a3e219a03d6ce31f5e 100644 --- a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx +++ b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx @@ -65,6 +65,10 @@ int otbImageToSIFTKeyPointSetFilterOutputAscii(int argc, char * argv[]) filter->Update(); PointsIteratorType pIt = filter->GetOutput()->GetPoints()->Begin(); + if (filter->GetOutput()->GetPointData() == NULL) + { + return EXIT_FAILURE;//Avoid the subsequent segfault, but need to check if that what the test want to do + } PointDataIteratorType pDataIt = filter->GetOutput()->GetPointData()->Begin(); std::ofstream outfile(outfname);