From ea2d8bf328e72da63edc1cfaaebfb6495ea1ccce Mon Sep 17 00:00:00 2001 From: degasus Date: Thu, 7 Nov 2013 15:54:16 +0100 Subject: [PATCH] VideoCommon: fix custom textures This fix a regression by revision 6cece6b48667 delete pointer must not do anything if pointer==NULL. --- Source/Core/VideoCommon/Src/TextureCacheBase.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp index 41af7ac946..c29a59e2b4 100644 --- a/Source/Core/VideoCommon/Src/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/Src/TextureCacheBase.cpp @@ -470,8 +470,11 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage, expandedHeight = height; // If we thought we could reuse the texture before, make sure to pool it now! - PoolTexture(entry); - entry = NULL; + if(entry) + { + PoolTexture(entry); + entry = NULL; + } } using_custom_texture = true; }