Skip to content
Permalink
Browse files

Fix crash when executing background threadable processing algorithms …

…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 16ebb263b3cda2704cd430743fbb865c477135c2
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/gui/processing/qgsprocessingalgorithmdialogbase.cpp
@@ -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,

0 comments on commit 16ebb26

Please sign in to comment.
You can’t perform that action at this time.