Repository navigation
Conversation
|
@boundsj, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh and @1ec5 to be potential reviewers. |
|
When #7962 lands, this PR could be updated to add tests for the scenario described in #7962 (comment) |
| } | ||
| auto originalLayer = std::make_unique<mbgl::style::BackgroundLayer>(self.identifier.UTF8String); | ||
| _pendingLayer = std::move(originalLayer); | ||
| self.rawLayer = _pendingLayer.get(); |
There was a problem hiding this comment.
If I understand correctly, these new lines are only relevant to the case where we bail below due to removing a layer of a different type than this class, correct? Otherwise, we’ll end up making the removed layer the pending layer.
There was a problem hiding this comment.
That is correct @1ec5. It is only to protect against that edge. I guess that could happen if you add a layer of type foo with identity bar and then (before adding) try to remove a layer of type baz with identity bar.
4fa67b6 to
500f683
Compare
500f683 to
13007e1
Compare
|
This is now happening in #7962 |
Fixes #8053
cc @1ec5