diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2015-12-15 21:04:15 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2015-12-15 21:04:15 -0800 |
commit | e304033552fd423db5324545216f9cf3a1e62150 (patch) | |
tree | a7e162af70b10e440a515d43b6fef9e618decf6a /src/mbgl/sprite | |
parent | 0f37b670bac6aace6b83148ccee3b63e42a6896c (diff) | |
download | qtlocation-mapboxgl-e304033552fd423db5324545216f9cf3a1e62150.tar.gz |
[core] Fixed annotation icon replacement
Another pass at #3146, including a unit test.
Diffstat (limited to 'src/mbgl/sprite')
-rw-r--r-- | src/mbgl/sprite/sprite_atlas.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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. } |