mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #15006: Prevent allocating empty texture atlases
This commit is contained in:
parent
2d78a5efc3
commit
6a219b2481
|
@ -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++)
|
||||
|
|
Loading…
Reference in New Issue