From d8a76231c31628e2899125b8993ab33573bafda4 Mon Sep 17 00:00:00 2001 From: Christian Holler Date: Thu, 16 Feb 2023 20:08:13 +0000 Subject: [PATCH] Bug 1817281 - Handle wrong deallocator type in TextureHost. r=gfx-reviewers,bradwerth Differential Revision: https://phabricator.services.mozilla.com/D170111 --- gfx/layers/composite/TextureHost.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gfx/layers/composite/TextureHost.cpp b/gfx/layers/composite/TextureHost.cpp index b8a79a4e6f067..b2ba46361d9bc 100644 --- a/gfx/layers/composite/TextureHost.cpp +++ b/gfx/layers/composite/TextureHost.cpp @@ -222,10 +222,11 @@ already_AddRefed TextureHost::Create( case SurfaceDescriptor::TSurfaceDescriptorRecorded: { const SurfaceDescriptorRecorded& desc = aDesc.get_SurfaceDescriptorRecorded(); + CompositorBridgeParentBase* actor = + aDeallocator ? aDeallocator->AsCompositorBridgeParentBase() : nullptr; UniquePtr realDesc = - aDeallocator - ? aDeallocator->AsCompositorBridgeParentBase() - ->LookupSurfaceDescriptorForClientTexture(desc.textureId()) + actor + ? actor->LookupSurfaceDescriptorForClientTexture(desc.textureId()) : nullptr; if (!realDesc) { gfxCriticalNote << "Failed to get descriptor for recorded texture.";