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 25, 2021
1 parent 06bc4be commit a32ac9772f341eb84578944baa5e394388775bfd
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 a32ac97

Please sign in to comment.