mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix crash in raster readXml when data provide cannot be created
Actually it was a consequence of a broken test, but there is no need to crash.
This commit is contained in:
parent
bd71df0054
commit
455b660e6b
@ -1491,6 +1491,12 @@ bool QgsRasterLayer::readXml( const QDomNode &layer_node, QgsReadWriteContext &c
|
||||
QgsDataProvider::ProviderOptions providerOptions;
|
||||
setDataProvider( mProviderKey, providerOptions );
|
||||
|
||||
if ( ! mDataProvider )
|
||||
{
|
||||
QgsDebugMsg( QStringLiteral( "Raster data provider could not be created for %1" ).arg( mDataSource ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
QString error;
|
||||
bool res = readSymbology( layer_node, error, context );
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user