From ccfa01789fed2a0a2f74340e8603e34403edc3ec Mon Sep 17 00:00:00 2001 From: Kurt Schwehr Date: Thu, 28 Nov 2024 09:41:46 -0800 Subject: [PATCH] gdaldrivermanager.cpp: Do not look for plugins in GetRealDriver when GDAL_NO_AUTOLOAD set. Fixes #11332 --- gcore/gdaldrivermanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcore/gdaldrivermanager.cpp b/gcore/gdaldrivermanager.cpp index 5c6a9c0fe457..80cdf6d3bd41 100644 --- a/gcore/gdaldrivermanager.cpp +++ b/gcore/gdaldrivermanager.cpp @@ -1380,6 +1380,9 @@ GDALDriver *GDALPluginDriverProxy::GetRealDriver() } else { +#ifdef GDAL_NO_AUTOLOAD + return nullptr; +#else CPLString osFuncName; if (STARTS_WITH(m_osPluginFileName.c_str(), "gdal_")) { @@ -1443,6 +1446,7 @@ GDALDriver *GDALPluginDriverProxy::GetRealDriver() poDriverManager->m_oMapRealDrivers.erase(oIter); } } +#endif // GDAL_NO_AUTOLOAD } if (m_poRealDriver)