Skip to content

Commit

Permalink
Avoid creating unused sinks
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jun 11, 2017
1 parent e49cc78 commit 355549a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/processing/qgsprocessingparameters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,9 @@ QgsFeatureSink *QgsProcessingParameters::parameterAsSink( const QgsProcessingPar
dest = val.toString();
}

if ( dest.isEmpty() )
return nullptr;

std::unique_ptr< QgsFeatureSink > sink( QgsProcessingUtils::createFeatureSink( dest, context, fields, geometryType, crs, createOptions ) );
destinationIdentifier = dest;

Expand Down

0 comments on commit 355549a

Please sign in to comment.