Skip to content

Commit fa74b04

Browse files
committedJun 7, 2016
[WFS provider] Fix crash when calling setSubsetString() with a SQL that modifies the fields while a download is in progress
1 parent 496c3f0 commit fa74b04

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/providers/wfs/qgswfsprovider.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -656,6 +656,11 @@ QString QgsWFSProvider::subsetString()
656656
bool QgsWFSProvider::setSubsetString( const QString& theSQL, bool updateFeatureCount )
657657
{
658658
QgsDebugMsg( QString( "theSql = '%1'" ).arg( theSQL ) );
659+
660+
// Invalid and cancel current download before altering fields, etc...
661+
// (crashes might happen if not done at the beginning)
662+
mShared->invalidateCache();
663+
659664
mSubsetString = theSQL;
660665
mCacheMinMaxDirty = true;
661666

0 commit comments

Comments
 (0)
Please sign in to comment.