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
commit3d137e9c0f25fb3d9fc2cfa5013310818c0d37da (patch)
treea4293081de1ea050c6764d3a8961ef11264725aa /sprite.c
parent09aef493a65012d1103b979e4f8cb619642b6627 (diff)
downloadopenttd-3d137e9c0f25fb3d9fc2cfa5013310818c0d37da.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;
}