Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] Fix crash when loading a layer from a string pointing to…
… an invalid/corrupt file
  • Loading branch information
nirvn committed May 6, 2023
1 parent 0b6a0f6 commit f729eb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/processing/qgsprocessingutils.cpp
Expand Up @@ -373,7 +373,7 @@ QgsMapLayer *QgsProcessingUtils::loadMapLayerFromString( const QString &string,
pointCloudLayer = std::make_unique< QgsPointCloudLayer >( uri, name, preferredProviders.at( 0 ).metadata()->key(), pointCloudOptions );
}
}
if ( pointCloudLayer->isValid() )
if ( pointCloudLayer && pointCloudLayer->isValid() )
{
return pointCloudLayer.release();
}
Expand Down

0 comments on commit f729eb0

Please sign in to comment.