From 492281702fece4e99ce8b5941fc5786428190022 Mon Sep 17 00:00:00 2001 From: Alessandro Pasotti Date: Tue, 23 May 2017 17:10:39 +0200 Subject: [PATCH] [bugfix] Fixes an unreported crash in WFS (backported from master) (cherry-picked from commit fe9594f) --- src/providers/wfs/qgswfsfeatureiterator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/providers/wfs/qgswfsfeatureiterator.cpp b/src/providers/wfs/qgswfsfeatureiterator.cpp index ee52aef428b2..f0b3774babe2 100644 --- a/src/providers/wfs/qgswfsfeatureiterator.cpp +++ b/src/providers/wfs/qgswfsfeatureiterator.cpp @@ -174,7 +174,11 @@ void QgsWFSFeatureDownloader::createProgressDialog() connect( mProgressDialog, SIGNAL( canceled() ), this, SLOT( stop() ) ); connect( mProgressDialog, SIGNAL( hide() ), this, SLOT( hideProgressDialog() ) ); - connect( this, SIGNAL( updateProgress( int ) ), mProgressDialog, SLOT( setValue( int ) ) ); + // Make sure the progress dialog has not been deleted by another thread + if ( mProgressDialog ) + { + connect( this, SIGNAL( updateProgress( int ) ), mProgressDialog, SLOT( setValue( int ) ) ); + } } QString QgsWFSFeatureDownloader::sanitizeFilter( QString filter )