summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/newgrf.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 0b0fe63b4..605b17023 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -1255,9 +1255,8 @@ static ChangeInfoResult StationChangeInfo(uint stid, int numinfo, int prop, Byte
}
case 0x09: // Define sprite layout
- delete[] statspec->renderdata; // delete earlier loaded stuff
-
statspec->tiles = buf->ReadExtendedByte();
+ delete[] statspec->renderdata; // delete earlier loaded stuff
statspec->renderdata = new NewGRFSpriteLayout[statspec->tiles];
for (uint t = 0; t < statspec->tiles; t++) {