Mercurial > hg > openttd
changeset 5061:a9066aa40688 draft
(svn r7114) -Codechange: [NewStations] Free up custom station layouts
author | peter1138 <peter1138@openttd.org> |
---|---|
date | Wed, 08 Nov 2006 12:28:57 +0000 |
parents | d3c28305504d |
children | 8e90954dfd25 |
files | newgrf.c |
diffstat | 1 files changed, 12 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/newgrf.c +++ b/newgrf.c @@ -3165,7 +3165,18 @@ free(statspec->renderdata); } - // TODO: Release platforms and layouts + /* Release platforms and layouts */ + if (!statspec->copied_layouts) { + uint l, p; + for (l = 0; l < statspec->lengths; l++) { + for (p = 0; p < statspec->platforms[l]; p++) { + free(statspec->layouts[l][p]); + } + free(statspec->layouts[l]); + } + free(statspec->layouts); + free(statspec->platforms); + } /* Release this station */ free(statspec);