Skip to content

Commit

Permalink
Fix crash
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jan 25, 2018
1 parent bf19eb6 commit f0e01d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/processing/qgsprocessingalgorithm.cpp
Expand Up @@ -107,12 +107,12 @@ void QgsProcessingAlgorithm::setProvider( QgsProcessingProvider *provider )
{
mProvider = provider;

if ( !mProvider->supportsNonFileBasedOutput() )
if ( mProvider && !mProvider->supportsNonFileBasedOutput() )
{
// need to update all destination parameters to turn off non file based outputs
Q_FOREACH ( const QgsProcessingParameterDefinition *definition, mParameters )
{
if ( definition->isDestination() && mProvider )
if ( definition->isDestination() )
{
const QgsProcessingDestinationParameter *destParam = static_cast< const QgsProcessingDestinationParameter *>( definition );
const_cast< QgsProcessingDestinationParameter *>( destParam )->setSupportsNonFileBasedOutput( false );
Expand Down

0 comments on commit f0e01d8

Please sign in to comment.