1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 18:25:16 +01:00

Merge pull request #15616 from ZehMatt/fix-15006

Fix #15006: Prevent allocating empty texture atlases
This commit is contained in:
ζeh Matt
2021-10-20 10:46:57 -07:00
committed by GitHub

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