From ed260548c57bbe8710c1c63035b66463d81f3620 Mon Sep 17 00:00:00 2001 From: AzaezelX Date: Thu, 8 Oct 2020 19:14:50 -0500 Subject: [PATCH] fix for empty r channel creation of composites crashing out --- Engine/source/gfx/gfxTextureManager.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Engine/source/gfx/gfxTextureManager.cpp b/Engine/source/gfx/gfxTextureManager.cpp index d51ff3f51..ba84dc9d5 100644 --- a/Engine/source/gfx/gfxTextureManager.cpp +++ b/Engine/source/gfx/gfxTextureManager.cpp @@ -1196,7 +1196,10 @@ GFXTextureObject *GFXTextureManager::createCompositeTexture(GBitmap*bmp[4], U32 { for (U32 y = 0; y < bmp[lastValidTex]->getHeight(); y++) { - rChan = bmp[0]->getChanelValueAt(x, y, inputKey[0]); + if (bmp[0]) + rChan = bmp[0]->getChanelValueAt(x, y, inputKey[0]); + else + gChan = 255; if (bmp[1]) gChan = bmp[1]->getChanelValueAt(x, y, inputKey[1]);