diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-05-13 16:37:40 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-05-14 11:29:24 +0300 |
commit | 5b6a262e1544fc9f649b53ef15ae19b9057356f1 (patch) | |
tree | 004cf1678190a8a75bb48e002da39575793f3023 /test/tile/raster_tile.test.cpp | |
parent | 7e77aff8dfc2434846614f919cd4f8db1a2ca2f0 (diff) | |
download | qtlocation-mapboxgl-5b6a262e1544fc9f649b53ef15ae19b9057356f1.tar.gz |
[core] GeometryTile and TileLoader keep strong reference to FileSource
Thus we fix a potential bug: if `Renderer` outlives the `Map` it will hold a stale reference to the `FileSource` instance.
Diffstat (limited to 'test/tile/raster_tile.test.cpp')
-rw-r--r-- | test/tile/raster_tile.test.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/tile/raster_tile.test.cpp b/test/tile/raster_tile.test.cpp index 3437061fa5..f19bd26260 100644 --- a/test/tile/raster_tile.test.cpp +++ b/test/tile/raster_tile.test.cpp @@ -16,10 +16,10 @@ using namespace mbgl; class RasterTileTest { public: - FakeFileSource fileSource; + std::shared_ptr<FileSource> fileSource = std::make_shared<FakeFileSource>(); TransformState transformState; util::RunLoop loop; - style::Style style { fileSource, 1 }; + style::Style style { *fileSource, 1 }; AnnotationManager annotationManager { style }; ImageManager imageManager; GlyphManager glyphManager; |