From 6c526e56370a0f4dee9a4b6ed45489fcb14e3ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 16 Sep 2014 14:48:46 +0200 Subject: make sure all of our async handles are stopped before stopping the map thread --- src/map/tile_parser.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'src/map/tile_parser.cpp') diff --git a/src/map/tile_parser.cpp b/src/map/tile_parser.cpp index 6923c1a422..8fbcfa45d7 100644 --- a/src/map/tile_parser.cpp +++ b/src/map/tile_parser.cpp @@ -38,19 +38,26 @@ namespace mbgl { TileParser::~TileParser() = default; TileParser::TileParser(const std::string &data, VectorTileData &tile, - const std::shared_ptr &style, - const std::shared_ptr &glyphAtlas, - const std::shared_ptr &glyphStore, - const std::shared_ptr &spriteAtlas, - const std::shared_ptr &sprite) + const std::shared_ptr &style_, + const std::shared_ptr &glyphAtlas_, + const std::shared_ptr &glyphStore_, + const std::shared_ptr &spriteAtlas_, + const std::shared_ptr &sprite_) : vector_data(pbf((const uint8_t *)data.data(), data.size())), tile(tile), - style(style), - glyphAtlas(glyphAtlas), - glyphStore(glyphStore), - spriteAtlas(spriteAtlas), - sprite(sprite), + style(style_), + glyphAtlas(glyphAtlas_), + glyphStore(glyphStore_), + spriteAtlas(spriteAtlas_), + sprite(sprite_), collision(std::make_unique(tile.id.z, 4096, tile.source.tile_size, tile.depth)) { + assert(&tile != nullptr); + assert(style); + assert(glyphAtlas); + assert(glyphStore); + assert(spriteAtlas); + assert(sprite); + assert(collision); } void TileParser::parse() { -- cgit v1.2.1