Merge pull request #354 from Azaezel/alpha40_compositCreationCoughup

fix for empty r channel creation of composites crashing out
This commit is contained in:
Brian Roberts 2020-10-08 19:15:13 -05:00 committed by GitHub
commit 6860bddf35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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]);