From 26f09d9a975848ba5c433efb9aff5730642c2e51 Mon Sep 17 00:00:00 2001 From: Lukas Aldershaab Date: Sun, 3 Jan 2021 01:32:39 +0100 Subject: [PATCH] Fail hard on unrecoverable mistakes in GFXTextureArray --- Engine/source/gfx/gfxTextureArray.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Engine/source/gfx/gfxTextureArray.cpp b/Engine/source/gfx/gfxTextureArray.cpp index 099d54635..c648386c1 100644 --- a/Engine/source/gfx/gfxTextureArray.cpp +++ b/Engine/source/gfx/gfxTextureArray.cpp @@ -138,7 +138,7 @@ void GFXTextureArray::setTexture(const GFXTexHandle& texture, U32 slot) GBitmap* inBitmap = TEXMGR->loadUncompressedTexture(texture->getPath(), &GFXTexturePersistentProfile, mWidth, mHeight); if (!inBitmap->setFormat(mFormat)) { - AssertWarn(true, "GFXTextureArray::setTexture all textures must be convertible to GFXFormat " + mFormat); + AssertFatal(true, "GFXTextureArray::setTexture all textures must be convertible to GFXFormat " + mFormat); Con::errorf("GFXTextureArray::setTexture all textures must be convertible to GFXFormat" + mFormat); handle = NULL; delete inBitmap; @@ -156,7 +156,7 @@ void GFXTextureArray::setTexture(const GFXTexHandle& texture, U32 slot) if (handle.getHeight() != mHeight || handle.getWidth() != mWidth || handle.getFormat() != mFormat || handle->getMipLevels() < mMipLevels) { - AssertWarn(true, "GFXTextureArray::setTexture all textures must have the same size and format"); + AssertFatal(true, "GFXTextureArray::setTexture all textures must have the same size and format"); Con::errorf("GFXTextureArray::setTexture all textures must have the same size and format"); return; }