Skip to content

Commit 9ed2636

Browse files
committed
[ArcGIS REST] Add missing mutex to QgsAfsProvider (fixes #17513)
1 parent db3c93c commit 9ed2636

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/providers/arcgisrest/qgsafsshareddata.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
bool QgsAfsSharedData::getFeature( QgsFeatureId id, QgsFeature &f, bool fetchGeometry, const QList<int> & /*fetchAttributes*/, const QgsRectangle &filterRect )
2121
{
22+
QMutexLocker locker(&mMutex);
23+
2224
// If cached, return cached feature
2325
QMap<QgsFeatureId, QgsFeature>::const_iterator it = mCache.constFind( id );
2426
if ( it != mCache.constEnd() )

src/providers/arcgisrest/qgsafsshareddata.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#define QGSAFSSHAREDDATA_H
1818

1919
#include <QObject>
20+
#include <QMutex>
2021
#include "qgsfields.h"
2122
#include "qgsfeature.h"
2223
#include "qgsdatasourceuri.h"
@@ -38,6 +39,7 @@ class QgsAfsSharedData : public QObject
3839

3940
private:
4041
friend class QgsAfsProvider;
42+
QMutex mMutex;
4143
QgsDataSourceUri mDataSource;
4244
QgsRectangle mExtent;
4345
QgsWkbTypes::Type mGeometryType = QgsWkbTypes::Unknown;

0 commit comments

Comments
 (0)