mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 15:58:39 +09:00
Make extra sure Compositables don't refer back to layers after reassignment.
This commit is contained in:
parent
8ad58ee574
commit
706ac5f0a4
3 changed files with 19 additions and 5 deletions
|
|
@ -50,9 +50,14 @@ bool
|
|||
ImageLayerComposite::SetCompositableHost(CompositableHost* aHost)
|
||||
{
|
||||
switch (aHost->GetType()) {
|
||||
case CompositableType::IMAGE:
|
||||
mImageHost = static_cast<ImageHost*>(aHost);
|
||||
case CompositableType::IMAGE: {
|
||||
ImageHost* newImageHost = static_cast<ImageHost*>(aHost);
|
||||
if (mImageHost && newImageHost != mImageHost) {
|
||||
mImageHost->Detach(this);
|
||||
}
|
||||
mImageHost = newImageHost;
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue