From 087b11e780a89928ae4f6d2229eb3e79f4f0689b Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 17 Mar 2019 16:41:50 +1000 Subject: [PATCH] TextureCacheBase: Fix possible crash on shutdown with deferred EFB copies --- Source/Core/VideoCommon/TextureCacheBase.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index a5ff0081c5..a210be3bc3 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -96,6 +96,9 @@ TextureCacheBase::TextureCacheBase() TextureCacheBase::~TextureCacheBase() { + // Clear pending EFB copies first, so we don't try to flush them. + m_pending_efb_copies.clear(); + HiresTexture::Shutdown(); Invalidate(); Common::FreeAlignedMemory(temp);