From bd3c50791024b313208a4e163b7632554d8b5e9c Mon Sep 17 00:00:00 2001 From: michi_cc Date: Sat, 4 Feb 2012 22:14:21 +0000 Subject: (svn r23896) -Fix (r23884): Don't free unallocated memory. --- src/spritecache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/spritecache.cpp b/src/spritecache.cpp index 83c6a15ae..75e402bed 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -885,7 +885,7 @@ void GfxClearSpriteCache() /* Clear sprite ptr for all cached items */ for (uint i = 0; i != _spritecache_items; i++) { SpriteCache *sc = GetSpriteCache(i); - if (sc->type != ST_RECOLOUR) DeleteEntryFromSpriteCache(i); + if (sc->type != ST_RECOLOUR && sc->ptr != NULL) DeleteEntryFromSpriteCache(i); } } -- cgit v1.2.3-70-g09d2