mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 913821 - Fix the TextureHost linked list. r=sotaro
This commit is contained in:
parent
5df1c0a5aa
commit
2b26f8b179
@ -60,11 +60,18 @@ CompositableHost::AddTextureHost(TextureHost* aTexture)
|
||||
void
|
||||
CompositableHost::RemoveTextureHost(uint64_t aTextureID)
|
||||
{
|
||||
if (mFirstTexture && mFirstTexture->GetID() == aTextureID) {
|
||||
RefPtr<TextureHost> toRemove = mFirstTexture;
|
||||
mFirstTexture = mFirstTexture->GetNextSibling();
|
||||
toRemove->SetNextSibling(nullptr);
|
||||
}
|
||||
RefPtr<TextureHost> it = mFirstTexture;
|
||||
while (it) {
|
||||
if (it->GetNextSibling() &&
|
||||
it->GetNextSibling()->GetID() == aTextureID) {
|
||||
RefPtr<TextureHost> toRemove = it->GetNextSibling();
|
||||
it->SetNextSibling(it->GetNextSibling()->GetNextSibling());
|
||||
toRemove->SetNextSibling(nullptr);
|
||||
}
|
||||
it = it->GetNextSibling();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user