1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 18:09:09 +00:00

(svn r23896) -Fix (r23884): Don't free unallocated memory.

This commit is contained in:
michi_cc
2012-02-04 22:14:21 +00:00
parent dd5d24c35a
commit bd3c507910

View File

@@ -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);
}
}