From 32de8eae22550595f7c1b2f3d870f16865899cd5 Mon Sep 17 00:00:00 2001 From: sotaro Date: Tue, 13 Dec 2022 00:12:49 +0000 Subject: [PATCH] Bug 1804592 - A little code cleanup of PersistentBufferProviderShared::Destroy() r=gfx-reviewers,lsalzman Differential Revision: https://phabricator.services.mozilla.com/D164176 --- gfx/layers/PersistentBufferProvider.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gfx/layers/PersistentBufferProvider.cpp b/gfx/layers/PersistentBufferProvider.cpp index f7a814591c08..1952d10044c9 100644 --- a/gfx/layers/PersistentBufferProvider.cpp +++ b/gfx/layers/PersistentBufferProvider.cpp @@ -643,8 +643,7 @@ void PersistentBufferProviderShared::Destroy() { mPermanentBackBuffer = nullptr; } - for (auto& mTexture : mTextures) { - TextureClient* texture = mTexture; + for (auto& texture : mTextures) { if (texture && texture->IsLocked()) { MOZ_ASSERT(false); texture->Unlock();