Reset previous style before creating new one
This ensures that the worker threads associated with the style are joined before new worker threads are launched. I don't know exactly why, but it seems to fix #1384.
This commit is contained in:
@@ -140,6 +140,8 @@ void MapContext::loadStyleJSON(const std::string& json, const std::string& base)
|
||||
assert(Environment::currentlyOn(ThreadType::Map));
|
||||
|
||||
sprite.reset();
|
||||
style.reset();
|
||||
|
||||
style = util::make_unique<Style>();
|
||||
style->base = base;
|
||||
style->loadJSON((const uint8_t *)json.c_str());
|
||||
|
||||
Reference in New Issue
Block a user