Update processedShaderMaterial.cpp

requires extra safety when the diffusemap asset is null, this is something that will be fixed by the material asset refactor
This commit is contained in:
marauder2k7 2025-03-30 12:22:17 +01:00
parent 774bd874b5
commit 79e046d379

View file

@ -875,6 +875,12 @@ void ProcessedShaderMaterial::setTextureStages( SceneRenderState *state, const S
case Material::TexTarget:
{
texTarget = rpd->mTexSlot[i].texTarget;
if (!mMaterial->getDiffuseMapAsset(0).notNull())
{
GFX->setTexture(i, NULL);
break;
}
texObject = mMaterial->getDiffuseMapAsset(0)->getTexture(&GFXStaticTextureSRGBProfile);
if ( !texTarget )
{