summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-12-26 15:14:37 +0000
committerfrosch <frosch@openttd.org>2012-12-26 15:14:37 +0000
commit24e62f39e072a4c8539b89a67504d42b90b65f87 (patch)
tree0f35c14813b8037a43477f1185d0fd24d5185fce
parente9afedca14d50b5d2f3011546b9a686f89ad1c07 (diff)
downloadopenttd-24e62f39e072a4c8539b89a67504d42b90b65f87.tar.xz
(svn r24858) -Fix [FS#5404]: Make invalid sprite references to mapgen sprites behave the same as invalid references between recolour and real sprites.
-rw-r--r--src/spritecache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/spritecache.cpp b/src/spritecache.cpp
index cf09853d1..55d5f376c 100644
--- a/src/spritecache.cpp
+++ b/src/spritecache.cpp
@@ -810,7 +810,7 @@ static void *HandleInvalidSpriteRequest(SpriteID sprite, SpriteType requested, S
*/
void *GetRawSprite(SpriteID sprite, SpriteType type, AllocatorProc *allocator)
{
- assert(IsMapgenSpriteID(sprite) == (type == ST_MAPGEN));
+ assert(type != ST_MAPGEN || IsMapgenSpriteID(sprite));
assert(type < ST_INVALID);
if (!SpriteExists(sprite)) {