mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
(svn r7114) -Codechange: [NewStations] Free up custom station layouts
This commit is contained in:
parent
0aa8c0123a
commit
2c17c649af
13
newgrf.c
13
newgrf.c
@ -3165,7 +3165,18 @@ static void ResetCustomStations(void)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user