From 8be8d5e843c0b1cdc3f94cdd1a3febc5a2ff197e Mon Sep 17 00:00:00 2001 From: peter1138 Date: Fri, 25 Nov 2011 11:45:46 +0000 Subject: (svn r23324) -Fix (r15555): Don't free reusable buffer. --- src/spriteloader/grf.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'src/spriteloader') diff --git a/src/spriteloader/grf.cpp b/src/spriteloader/grf.cpp index 2876f2f35..b4533ae94 100644 --- a/src/spriteloader/grf.cpp +++ b/src/spriteloader/grf.cpp @@ -109,7 +109,6 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, do { if (dest + 2 > dest_orig + dest_size) { - free(sprite->data); return WarnCorruptSprite(file_slot, file_pos, __LINE__); } @@ -125,7 +124,6 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, data = &sprite->data[y * sprite->width + skip]; if (skip + length > sprite->width || dest + length > dest_orig + dest_size) { - free(sprite->data); return WarnCorruptSprite(file_slot, file_pos, __LINE__); } @@ -142,7 +140,6 @@ bool SpriteLoaderGrf::LoadSprite(SpriteLoader::Sprite *sprite, uint8 file_slot, } } else { if (dest_size < sprite->width * sprite->height) { - free(sprite->data); return WarnCorruptSprite(file_slot, file_pos, __LINE__); } -- cgit v1.2.3-70-g09d2