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 20, 2021
1 parent 3420e8a commit f52f2b4454c6ec966385a4c33a9c6383da1744a6
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/providers/ogr/qgsogrprovider.cpp
@@ -1433,10 +1433,10 @@ void QgsOgrProvider::loadMetadata()
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 f52f2b4

Please sign in to comment.