diff options
-rw-r--r-- | src/mbgl/map/map.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index aa56ea1e71..a49df01191 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<UpdateType>(Update::Nothing)); - if (u & static_cast<UpdateType>(Update::StyleInfo)) { + if ((u & static_cast<UpdateType>(Update::StyleInfo)) || !style) { reloadStyle(); } if (u & static_cast<UpdateType>(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()); |