[ArcGIS REST] Add missing mutex to QgsAfsProvider (fixes #17513)

This commit is contained in:
Sandro Mani 2017-11-22 11:47:38 +01:00
parent db3c93c3a6
commit 9ed26361a6
2 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,8 @@
bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, bool fetchGeometry, const QList<int> & /*fetchAttributes*/, const QgsRectangle &filterRect )
{
QMutexLocker locker(&mMutex);
// If cached, return cached feature
QMap<QgsFeatureId, QgsFeature>::const_iterator it = mCache.constFind( id );
if ( it != mCache.constEnd() )

View File

@ -17,6 +17,7 @@
#define QGSAFSSHAREDDATA_H
#include <QObject>
#include <QMutex>
#include "qgsfields.h"
#include "qgsfeature.h"
#include "qgsdatasourceuri.h"
@ -38,6 +39,7 @@ class QgsAfsSharedData : public QObject
private:
friend class QgsAfsProvider;
QMutex mMutex;
QgsDataSourceUri mDataSource;
QgsRectangle mExtent;
QgsWkbTypes::Type mGeometryType = QgsWkbTypes::Unknown;