summaryrefslogtreecommitdiff
path: root/src/mbgl/style/custom_tile_loader.hpp
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-05-02 11:40:23 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-05-02 11:43:26 +0300
commitb7b25fde783f088bf1f23bdf943a360b24fdbd78 (patch)
treec594c9ebcbddcaf50dffeb54bc0262521cf7d4f7 /src/mbgl/style/custom_tile_loader.hpp
parent98e89208357e3ae586791e9d3844c52eac5f133b (diff)
downloadqtlocation-mapboxgl-b7b25fde783f088bf1f23bdf943a360b24fdbd78.tar.gz
[core] Guard access to CustomTileLoader's data members with mutex
Diffstat (limited to 'src/mbgl/style/custom_tile_loader.hpp')
-rw-r--r--src/mbgl/style/custom_tile_loader.hpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/style/custom_tile_loader.hpp b/src/mbgl/style/custom_tile_loader.hpp
index 335d8c6143..7d2d5cffe6 100644
--- a/src/mbgl/style/custom_tile_loader.hpp
+++ b/src/mbgl/style/custom_tile_loader.hpp
@@ -6,6 +6,7 @@
#include <mbgl/actor/actor_ref.hpp>
#include <map>
+#include <mutex>
namespace mbgl {
@@ -38,7 +39,7 @@ private:
std::unordered_map<CanonicalTileID, std::vector<OverscaledIDFunctionTuple>> tileCallbackMap;
// Keep around a cache of tile data to serve back for wrapped and over-zooomed tiles
std::map<CanonicalTileID, std::unique_ptr<GeoJSON>> dataCache;
-
+ std::mutex dataMutex;
};
} // namespace style