mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
Infinite loop guard
This commit is contained in:
parent
9529488dd3
commit
398b37ffe9
1 changed files with 3 additions and 0 deletions
|
@ -49,6 +49,9 @@ static std::atomic<bool> compressGrayscaleTextures { false };
|
||||||
static std::atomic<bool> compressCubeTextures { false };
|
static std::atomic<bool> compressCubeTextures { false };
|
||||||
|
|
||||||
uint rectifyDimension(const uint& dimension) {
|
uint rectifyDimension(const uint& dimension) {
|
||||||
|
if (dimension == 0) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if (dimension < SPARSE_PAGE_SIZE.x) {
|
if (dimension < SPARSE_PAGE_SIZE.x) {
|
||||||
uint newSize = SPARSE_PAGE_SIZE.x;
|
uint newSize = SPARSE_PAGE_SIZE.x;
|
||||||
while (dimension <= newSize / 2) {
|
while (dimension <= newSize / 2) {
|
||||||
|
|
Loading…
Reference in a new issue