Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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 f52f2b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -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 );

Expand Down

0 comments on commit f52f2b4

Please sign in to comment.