summaryrefslogtreecommitdiff
path: root/test/tile/raster_tile.test.cpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-05-13 16:37:40 +0300
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-05-13 16:56:22 +0300
commit04f4862f0864dc00d904a30c735ea11f2fa64a88 (patch)
tree577a62f5263d497a4256aca163bee94f85b0bd54 /test/tile/raster_tile.test.cpp
parentbe90c7baa2e4e7de90dc3573d650e3fd5d12b9d3 (diff)
downloadqtlocation-mapboxgl-04f4862f0864dc00d904a30c735ea11f2fa64a88.tar.gz
[core] GeometryTile and TileLoader keep strong reference to FileSourceupstream/mikhail_create_glyph_manager
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.cpp4
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;