diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-11-14 15:49:25 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-14 15:49:25 +0100 |
| commit | 48f018f0032f4769e1ab0f09e930f5ac9040b4c9 (patch) | |
| tree | dfe9c8319e24f61ee648e4b7dc4f32e3fa3e5a20 /src/iso19111/operation/coordinateoperationfactory.cpp | |
| parent | 618120f6595b1d7f6614d01f7ffc94d9de07d25f (diff) | |
| parent | 5939b96213305295edd010892220919f8f2fd1cf (diff) | |
| download | PROJ-48f018f0032f4769e1ab0f09e930f5ac9040b4c9.tar.gz PROJ-48f018f0032f4769e1ab0f09e930f5ac9040b4c9.zip | |
Merge pull request #2938 from rouault/fix_ossfuzz_40955
createOperationsCompoundToCompound(): fix null pointer dereference when connection to proj.db doesn't exist.
Diffstat (limited to 'src/iso19111/operation/coordinateoperationfactory.cpp')
| -rw-r--r-- | src/iso19111/operation/coordinateoperationfactory.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/iso19111/operation/coordinateoperationfactory.cpp b/src/iso19111/operation/coordinateoperationfactory.cpp index 971e265a..3dc7e290 100644 --- a/src/iso19111/operation/coordinateoperationfactory.cpp +++ b/src/iso19111/operation/coordinateoperationfactory.cpp @@ -5263,8 +5263,10 @@ void CoordinateOperationFactory::Private::createOperationsCompoundToCompound( // and a geoid model for Belfast height referenced to ETRS89 if (verticalTransforms.size() == 1 && verticalTransforms.front()->hasBallparkTransformation()) { - auto dbContext = - context.context->getAuthorityFactory()->databaseContext(); + const auto &authFactory = context.context->getAuthorityFactory(); + auto dbContext = authFactory + ? authFactory->databaseContext().as_nullable() + : nullptr; const auto intermGeogSrc = srcGeog->promoteTo3D(std::string(), dbContext); const bool intermGeogSrcIsSameAsIntermGeogDst = |
