Skip to content
Snippets Groups Projects
Commit f86b076f authored by Julien Michel's avatar Julien Michel
Browse files

BUG: Fixing a segmentation fault in case a null feature is encountered

parent 1033629f
No related branches found
No related tags found
No related merge requests found
...@@ -1238,6 +1238,12 @@ void TestHelper::DumpOGRFeature(FILE* fpOut, OGRFeature* feature, char** papszOp ...@@ -1238,6 +1238,12 @@ void TestHelper::DumpOGRFeature(FILE* fpOut, OGRFeature* feature, char** papszOp
{ {
if (fpOut == NULL) fpOut = stdout; if (fpOut == NULL) fpOut = stdout;
if(!feature)
{
fprintf(fpOut, "NULL feature encountered\n");
return;
}
fprintf(fpOut, "OGRFeature:%ld\n", feature->GetFID()); fprintf(fpOut, "OGRFeature:%ld\n", feature->GetFID());
const char* pszDisplayFields = const char* pszDisplayFields =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment