Skip to content

Commit

Permalink
[OGR provider] Workaround crash on SQLite layers with GDAL 3.3.0
Browse files Browse the repository at this point in the history
Fixes #43224

Proper fix is in GDAL in OSGeo/gdal#3862
  • Loading branch information
rouault authored and nyalldawson committed May 25, 2021
1 parent 06bc4be commit a32ac97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -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 );
}
Expand Down

0 comments on commit a32ac97

Please sign in to comment.