(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:
frosch 2011-05-29 16:54:40 +00:00
parent 8f921c8747
commit 5b449145f7
1 changed files with 1 additions and 2 deletions

View File

@ -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++) {