We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45c0cec commit ea75dfbCopy full SHA for ea75dfb
ogr/ogrsf_frmts/shape/ogrshapelayer.cpp
@@ -2502,11 +2502,12 @@ const OGRSpatialReference *OGRShapeGeomFieldDefn::GetSpatialRef() const
2502
if (poSRSNonConst)
2503
{
2504
double adfTOWGS84[7];
2505
+ const char *pszSRSName = poSRSNonConst->GetName();
2506
if (CPLTestBool(
2507
CPLGetConfigOption("USE_OSR_FIND_MATCHES", "YES")) &&
2508
// Below works around bug fixed in PROJ per
2509
// https://github.com/OSGeo/PROJ/pull/4599
- !(strstr(poSRSNonConst->GetName(), "NTF (Paris)") != nullptr &&
2510
+ !(pszSRSName && strstr(pszSRSName, "NTF (Paris)") != nullptr &&
2511
poSRSNonConst->GetTOWGS84(adfTOWGS84) == OGRERR_NONE))
2512
2513
auto poSRSMatch = poSRSNonConst->FindBestMatch();
0 commit comments