Skip to content

Commit

Permalink
Merge pull request #4991 from marioba/fix_processing_parameters
Browse files Browse the repository at this point in the history
Protect processing parameters from segfault
  • Loading branch information
nyalldawson committed Aug 6, 2017
2 parents f6bc74c + 558b8d3 commit 37bc07a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/processing/qgsprocessingparameters.cpp
Expand Up @@ -391,7 +391,7 @@ QString QgsProcessingParameters::parameterAsOutputLayer( const QgsProcessingPara
{
dest = val.value< QgsProperty >().valueAsString( context.expressionContext(), definition->defaultValue().toString() );
}
else if ( !val.isValid() || val.toString().isEmpty() )
else if ( definition && ( !val.isValid() || val.toString().isEmpty() ) )
{
// fall back to default
dest = definition->defaultValue().toString();
Expand Down

0 comments on commit 37bc07a

Please sign in to comment.