diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index 2113ba658..423e45ee8 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -96,6 +96,7 @@ Map::Map(View& view_, FileSource& fileSource_) transform(view_), fileSource(fileSource_), glyphAtlas(util::make_unique(1024, 1024)), + glyphStore(std::make_shared(fileSource)), spriteAtlas(util::make_unique(512, 512)), texturePool(std::make_shared()), painter(util::make_unique(*spriteAtlas, *glyphAtlas)) @@ -146,7 +147,6 @@ void Map::start() { assert(std::this_thread::get_id() == mapThread); // Remove all of these to make sure they are destructed in the correct thread. - glyphStore.reset(); style.reset(); workers.reset(); activeSources.clear(); @@ -312,7 +312,6 @@ void Map::setStyleJSON(std::string newStyleJSON, const std::string &base) { style = std::make_shared