Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[WFS provider] Fix crash when calling setSubsetString() with a SQL th…
…at modifies the fields while a download is in progress
  • Loading branch information
rouault committed Jun 7, 2016
1 parent 496c3f0 commit fa74b04
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/providers/wfs/qgswfsprovider.cpp
Expand Up @@ -656,6 +656,11 @@ QString QgsWFSProvider::subsetString()
bool QgsWFSProvider::setSubsetString( const QString& theSQL, bool updateFeatureCount )
{
QgsDebugMsg( QString( "theSql = '%1'" ).arg( theSQL ) );

// Invalid and cancel current download before altering fields, etc...
// (crashes might happen if not done at the beginning)
mShared->invalidateCache();

mSubsetString = theSQL;
mCacheMinMaxDirty = true;

Expand Down

0 comments on commit fa74b04

Please sign in to comment.