Skip to content

Commit

Permalink
GDALVectorInfo(): do not crash if psOptions == nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Nov 14, 2024
1 parent 4dd4d08 commit 78ea0e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/ogrinfo_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1825,6 +1825,10 @@ char *GDALVectorInfo(GDALDatasetH hDataset,
if (poDS == nullptr)
return nullptr;

const GDALVectorInfoOptions sDefaultOptions;
if (!psOptions)
psOptions = &sDefaultOptions;

GDALDriver *poDriver = poDS->GetDriver();

CPLString osRet;
Expand Down

0 comments on commit 78ea0e6

Please sign in to comment.