mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r22517) -Fix (r22472): If a NewGRF sprite ran out of bytes at a very specific point, data might be freed twice.
This commit is contained in:
parent
a2dcfce59d
commit
2d24e00b27
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user