diff options
author | Markus Härer <markus.haerer@gmx.net> | 2024-01-05 00:25:19 +0100 |
---|---|---|
committer | Markus Härer <markus.haerer@gmx.net> | 2024-01-07 02:02:13 +0100 |
commit | 64808b264688f0ae72aa8c710d810e3e8fd3b04e (patch) | |
tree | 4330eddad29b51ea9ae753ebfb249b06b1d50042 | |
parent | 15b92465cd7ee4d6d248f5783314e8e51e5c4a59 (diff) |
CTextureCache: Fix ClearCachedImage
The passed in url wasn't "unwrapped" like for all other *Image member
functions. This resulted in cached images not being cleared using the same url
used for caching.
(cherry picked from commit a6bc5237e8b9a327fe563f5a802620a930e2c1a6)
-rw-r--r-- | xbmc/TextureCache.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xbmc/TextureCache.cpp b/xbmc/TextureCache.cpp index beca7cf9fd..6eeb098f8f 100644 --- a/xbmc/TextureCache.cpp +++ b/xbmc/TextureCache.cpp @@ -203,9 +203,10 @@ bool CTextureCache::CacheImage(const std::string &image, CTextureDetails &detail return !path.empty(); } -void CTextureCache::ClearCachedImage(const std::string &url, bool deleteSource /*= false */) +void CTextureCache::ClearCachedImage(const std::string& image, bool deleteSource /*= false */) { //! @todo This can be removed when the texture cache covers everything. + const std::string url = CTextureUtils::UnwrapImageURL(image); std::string path = deleteSource ? url : ""; std::string cachedFile; if (ClearCachedTexture(url, cachedFile)) |