diff --git a/Code/Testing/otbTestHelper.cxx b/Code/Testing/otbTestHelper.cxx index 790ed365b4410fc78377af4afdf5cd0a30438582..f4986230e22e20495f1c6b1bb75a167e7448c95f 100644 --- a/Code/Testing/otbTestHelper.cxx +++ b/Code/Testing/otbTestHelper.cxx @@ -1238,6 +1238,12 @@ void TestHelper::DumpOGRFeature(FILE* fpOut, OGRFeature* feature, char** papszOp { if (fpOut == NULL) fpOut = stdout; + if(!feature) + { + fprintf(fpOut, "NULL feature encountered\n"); + return; + } + fprintf(fpOut, "OGRFeature:%ld\n", feature->GetFID()); const char* pszDisplayFields =