Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix crash on exit
  • Loading branch information
nyalldawson committed Jul 16, 2018
1 parent 45d856e commit 1134386
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion python/plugins/processing/gui/ProcessingToolbox.py
Expand Up @@ -139,7 +139,8 @@ def addProviderActions(self, provider):

def addProvider(self, provider_id):
provider = QgsApplication.processingRegistry().providerById(provider_id)
self.addProviderActions(provider)
if provider is not None:
self.addProviderActions(provider)

def removeProvider(self, provider_id):
button = self.findChild(QToolButton, 'provideraction-' + provider_id)
Expand Down
8 changes: 5 additions & 3 deletions src/gui/processing/qgsprocessingtoolboxmodel.cpp
Expand Up @@ -165,7 +165,8 @@ void QgsProcessingToolboxModel::repopulateRecentAlgorithms( bool resetting )

if ( !mRegistry )
{
emit recentAlgorithmAdded();
if ( !resetting )
emit recentAlgorithmAdded();
return;
}

Expand All @@ -181,7 +182,8 @@ void QgsProcessingToolboxModel::repopulateRecentAlgorithms( bool resetting )

if ( recentAlgorithms.empty() )
{
emit recentAlgorithmAdded();
if ( !resetting )
emit recentAlgorithmAdded();
return;
}

Expand All @@ -199,8 +201,8 @@ void QgsProcessingToolboxModel::repopulateRecentAlgorithms( bool resetting )
if ( !resetting )
{
endInsertRows();
emit recentAlgorithmAdded();
}
emit recentAlgorithmAdded();
}

void QgsProcessingToolboxModel::providerAdded( const QString &id )
Expand Down

0 comments on commit 1134386

Please sign in to comment.