Changeset - r19902:e42f89309b13
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2012-12-26 15:14:37
frosch@openttd.org
(svn r24858) -Fix [FS#5404]: Make invalid sprite references to mapgen sprites behave the same as invalid references between recolour and real sprites.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/spritecache.cpp
Show inline comments
 
@@ -807,13 +807,13 @@ static void *HandleInvalidSpriteRequest(
 
 * @param type Expected sprite type.
 
 * @param allocator Allocator function to use. Set to NULL to use the usual sprite cache.
 
 * @return Sprite raw data
 
 */
 
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)) {
 
		DEBUG(sprite, 1, "Tried to load non-existing sprite #%d. Probable cause: Wrong/missing NewGRFs", sprite);
 

	
 
		/* SPR_IMG_QUERY is a BIG FAT RED ? */
0 comments (0 inline, 0 general)