Skip to content

Commit

Permalink
Fix crash when executing background threadable processing algorithms …
Browse files Browse the repository at this point in the history
…on Windows

Yet again processEvents() comes around to bite us in the butt.
  • Loading branch information
nyalldawson committed Jan 22, 2018
1 parent 5fcd2dc commit 16ebb26
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/gui/processing/qgsprocessingalgorithmdialogbase.cpp
Expand Up @@ -417,6 +417,16 @@ QString QgsProcessingAlgorithmDialogBase::formatHelp( QgsProcessingAlgorithm *al

void QgsProcessingAlgorithmDialogBase::processEvents()
{
if ( mAlgorithmTask )
{
// no need to call this - the algorithm is running in a thread.
// in fact, calling it causes a crash on Windows when the algorithm
// is running in a background thread... unfortunately we need something
// like this for non-threadable algorithms, otherwise there's no chance
// for users to hit cancel or see progress updates...
return;
}

// So that we get a chance of hitting the Abort button
#ifdef Q_OS_LINUX
// For some reason on Windows hasPendingEvents() always return true,
Expand Down

0 comments on commit 16ebb26

Please sign in to comment.