diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/map/map.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/sprite/sprite_atlas.cpp | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/mbgl/map/map.cpp b/src/mbgl/map/map.cpp index c07eda6b46..5e22e8aeef 100644 --- a/src/mbgl/map/map.cpp +++ b/src/mbgl/map/map.cpp @@ -392,7 +392,7 @@ void Map::addAnnotationIcon(const std::string& name, std::shared_ptr<const Sprit } void Map::removeAnnotationIcon(const std::string& name) { - removeAnnotationIcon(name); + context->invoke(&MapContext::removeAnnotationIcon, name); } double Map::getTopOffsetPixelsForAnnotationIcon(const std::string& symbol) { diff --git a/src/mbgl/sprite/sprite_atlas.cpp b/src/mbgl/sprite/sprite_atlas.cpp index 202218f51c..d09330e17b 100644 --- a/src/mbgl/sprite/sprite_atlas.cpp +++ b/src/mbgl/sprite/sprite_atlas.cpp @@ -189,11 +189,10 @@ void SpriteAtlas::updateDirty() { holder.texture = spriteIterator->second; if (holder.texture != nullptr) { copy(holder, imageIterator->first.second); + ++imageIterator; } else { - images.erase(imageIterator); + images.erase(imageIterator++); } - - ++imageIterator; // Don't advance the spriteIterator because there might be another sprite with the same // name, but a different wrap value. } |