Skip to content

Commit

Permalink
Merge pull request #37765 from elpaso/bugfix-gh37757-auto-find
Browse files Browse the repository at this point in the history
Fix freeze when auto-finding broken layers
  • Loading branch information
elpaso committed Jul 12, 2020
2 parents 2e2acf9 + 01c3b47 commit 2c1bcff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/qgshandlebadlayers.cpp
Expand Up @@ -589,7 +589,7 @@ void QgsHandleBadLayers::autoFind()

// Try first to change the datasource of the existing layers, this will
// maintain the current status (checked/unchecked) and group
if ( QgsProject::instance()->mapLayer( layerId ) )
if ( !datasource.isEmpty() && QgsProject::instance()->mapLayer( layerId ) )
{
QgsDataProvider::ProviderOptions options;
QgsMapLayer *mapLayer = QgsProject::instance()->mapLayer( layerId );
Expand Down

0 comments on commit 2c1bcff

Please sign in to comment.