[WFS provider] Fix crash when calling setSubsetString() with a SQL that modifies the fields while a download is in progress

This commit is contained in:
Even Rouault 2016-06-07 16:22:47 +02:00
parent 496c3f03a1
commit fa74b04ee9

View File

@ -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;