1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-10 09:32:29 +01:00

Fix #15006: Prevent allocating empty texture atlases

This commit is contained in:
ζeh Matt
2021-10-20 19:02:15 +03:00
parent 2d78a5efc3
commit 6a219b2481

View File

@@ -101,8 +101,8 @@ public:
_atlasWidth = atlasWidth;
_atlasHeight = atlasHeight;
_cols = _atlasWidth / _imageSize;
_rows = _atlasHeight / _imageSize;
_cols = std::max(1, _atlasWidth / _imageSize);
_rows = std::max(1, _atlasHeight / _imageSize);
_freeSlots.resize(_cols * _rows);
for (size_t i = 0; i < _freeSlots.size(); i++)