summaryrefslogtreecommitdiff
path: root/sprite.c
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-04-20 13:33:40 +0000
committerpeter1138 <peter1138@openttd.org>2006-04-20 13:33:40 +0000
commit9ed8c6d4acea5c41246d3fa54301d4a0cc814985 (patch)
treea4293081de1ea050c6764d3a8961ef11264725aa /sprite.c
parent62145d16b55aaf13451f7c6595d4675ff0499b47 (diff)
downloadopenttd-9ed8c6d4acea5c41246d3fa54301d4a0cc814985.tar.xz
(svn r4483) - NewGRF: Dynamically allocate memory for 'real' spritegroups. This removes the limit of 16 loading/unloading states, although will result in less memory usage as most of the time the full fixed allocation wasn't used.
Diffstat (limited to 'sprite.c')
-rw-r--r--sprite.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sprite.c b/sprite.c
index 2d76b7527..47d0c1c8b 100644
--- a/sprite.c
+++ b/sprite.c
@@ -132,6 +132,8 @@ void UnloadSpriteGroup(SpriteGroup **group_ptr)
for (i = 0; i < rsg->loaded_count; i++) {
if (rsg->loaded[i] != NULL) UnloadSpriteGroup(&rsg->loaded[i]);
}
+ free(group->g.real.loaded);
+ free(group->g.real.loading);
free(group);
return;
}