Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #53027 from nirvn/processing_crash_fix
[processing] Fix crash when loading a layer from a string pointing to an invalid/corrupt file
  • Loading branch information
alexbruy committed May 8, 2023
2 parents 4720209 + f729eb0 commit 7685c9a
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 7685c9a

Please sign in to comment.