Skip to content

Commit

Permalink
[ArcGIS REST] Add missing mutex to QgsAfsProvider (fixes #17513)
Browse files Browse the repository at this point in the history
  • Loading branch information
manisandro committed Nov 22, 2017
1 parent db3c93c commit 9ed2636
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/providers/arcgisrest/qgsafsshareddata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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() )
Expand Down
2 changes: 2 additions & 0 deletions src/providers/arcgisrest/qgsafsshareddata.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define QGSAFSSHAREDDATA_H

#include <QObject>
#include <QMutex>
#include "qgsfields.h"
#include "qgsfeature.h"
#include "qgsdatasourceuri.h"
Expand All @@ -38,6 +39,7 @@ class QgsAfsSharedData : public QObject

private:
friend class QgsAfsProvider;
QMutex mMutex;
QgsDataSourceUri mDataSource;
QgsRectangle mExtent;
QgsWkbTypes::Type mGeometryType = QgsWkbTypes::Unknown;
Expand Down

0 comments on commit 9ed2636

Please sign in to comment.