Skip to content
Permalink
Browse files
[OGR provider] Workaround crash on SQLite layers with GDAL 3.3.0
Fixes #43224

Proper fix is in GDAL in OSGeo/gdal#3862
  • Loading branch information
rouault authored and nyalldawson committed May 21, 2021
1 parent 8b70ff9 commit a9a4b7ab8b5a93d0c939cff2f71e3b561e294dff
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/providers/ogr/qgsogrprovider.cpp
@@ -587,10 +587,10 @@ QgsOgrProvider::QgsOgrProvider( QString const &uri, const ProviderOptions &optio
QMutex *mutex = nullptr;
OGRLayerH layer = mOgrOrigLayer->getHandleAndMutex( mutex );
QMutexLocker locker( mutex );
const QString identifier = GDALGetMetadataItem( layer, "IDENTIFIER", nullptr );
const QString identifier = GDALGetMetadataItem( layer, "IDENTIFIER", "" );
if ( !identifier.isEmpty() )
mLayerMetadata.setTitle( identifier ); // see geopackage specs -- "'identifier' is analogous to 'title'"
const QString abstract = GDALGetMetadataItem( layer, "DESCRIPTION", nullptr );
const QString abstract = GDALGetMetadataItem( layer, "DESCRIPTION", "" );
if ( !abstract.isEmpty() )
mLayerMetadata.setAbstract( abstract );
}

0 comments on commit a9a4b7a

Please sign in to comment.