From ae006ee5e32e5a88516bd222857890ccc4152b70 Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Tue, 29 Sep 2009 15:42:15 +0800 Subject: [PATCH] BUG: the SIFT test should check that the data it tries to access really exists --- .../otbImageToSIFTKeyPointSetFilterOutputAscii.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx b/Testing/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilterOutputAscii.cxx index 02ba96399e..c58c27f748 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); -- GitLab