summaryrefslogtreecommitdiff
path: root/src/mbgl/style
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-05-02 11:37:02 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-05-03 10:01:19 +0300
commit86b94e30e17af5404ff69c5fef19abc2bc8b6fa1 (patch)
treebba7f938d2b88984244e1c11cbd8079d2efcc6f1 /src/mbgl/style
parentf7915fdc51f4924df2e2630b64908938ffa49830 (diff)
downloadqtlocation-mapboxgl-86b94e30e17af5404ff69c5fef19abc2bc8b6fa1.tar.gz
[core] Keep shared_ptr to thread pool in CustomGeometrySource
CustomGeometrySource should keep strong reference to shared thread pool that is used by CustomTileLoader.
Diffstat (limited to 'src/mbgl/style')
-rw-r--r--src/mbgl/style/sources/custom_geometry_source.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/style/sources/custom_geometry_source.cpp b/src/mbgl/style/sources/custom_geometry_source.cpp
index 6ce7c1be11..7420be9320 100644
--- a/src/mbgl/style/sources/custom_geometry_source.cpp
+++ b/src/mbgl/style/sources/custom_geometry_source.cpp
@@ -14,7 +14,8 @@ namespace style {
CustomGeometrySource::CustomGeometrySource(std::string id,
const CustomGeometrySource::Options options)
: Source(makeMutable<CustomGeometrySource::Impl>(std::move(id), options)),
- loader(std::make_unique<Actor<CustomTileLoader>>(*sharedThreadPool(), options.fetchTileFunction, options.cancelTileFunction)) {
+ threadPool(sharedThreadPool()),
+ loader(std::make_unique<Actor<CustomTileLoader>>(*threadPool, options.fetchTileFunction, options.cancelTileFunction)) {
}
CustomGeometrySource::~CustomGeometrySource() = default;