From 409a2b5e286bba78fb72c4e1b74603e024de3c0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Mon, 8 Mar 2021 00:55:17 +0100 Subject: [PATCH] Work around crash in texture replacement. See #14252 --- GPU/Common/TextureCacheCommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPU/Common/TextureCacheCommon.cpp b/GPU/Common/TextureCacheCommon.cpp index b33e206058..949c08c92e 100644 --- a/GPU/Common/TextureCacheCommon.cpp +++ b/GPU/Common/TextureCacheCommon.cpp @@ -221,7 +221,7 @@ SamplerCacheKey TextureCacheCommon::GetSamplingParams(int maxLevel, const TexCac // Filtering overrides from replacements or settings. TextureFiltering forceFiltering = TEX_FILTER_AUTO; - u64 cachekey = replacer_.Enabled() ? entry->CacheKey() : 0; + u64 cachekey = replacer_.Enabled() ? (entry ? entry->CacheKey() : 0) : 0; if (!replacer_.Enabled() || entry == nullptr || !replacer_.FindFiltering(cachekey, entry->fullhash, &forceFiltering)) { switch (g_Config.iTexFiltering) { case TEX_FILTER_AUTO: