1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-27 08:29:11 +00:00

Fix faa845398f: Crash when loading tile layout with no building sprites. (#13589)

Tile layouts are permitted to have no building sprites, therefore the test for an empty sequence of sprites is not valid.
This commit is contained in:
2025-02-17 03:29:56 +00:00
committed by GitHub
parent 13944222f3
commit ed57b9c297

View File

@@ -583,7 +583,6 @@ void NewGRFSpriteLayout::Allocate(uint num_sprites)
*/
void NewGRFSpriteLayout::AllocateRegisters()
{
assert(!this->seq.empty());
assert(this->registers.empty());
this->registers.resize(1 + this->seq.size(), {}); // 1 for the ground sprite