diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index aa56ea1e7..a49df0119 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -760,7 +760,7 @@ void Map::prepare() { assert(Environment::currentlyOn(ThreadType::Map)); const auto u = updated.exchange(static_cast(Update::Nothing)); - if (u & static_cast(Update::StyleInfo)) { + if ((u & static_cast(Update::StyleInfo)) || !style) { reloadStyle(); } if (u & static_cast(Update::Debug)) { @@ -810,6 +810,7 @@ void Map::render() { // Cleanup OpenGL objects that we abandoned since the last render call. env->performCleanup(); + assert(style); assert(painter); painter->render(*style, activeSources, state, data->getAnimationTime());