Fix possible null pointer crash

master
Ansariel 2024-06-10 18:25:45 +02:00 committed by Andrey Lihatskiy
parent 4b52dd754b
commit 32fcefc058
1 changed files with 8 additions and 4 deletions

View File

@ -1255,11 +1255,15 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
clearState(GLOBAL);
}
LLColor4U color = tep->getColor();
if (tep->getGLTFRenderMaterial())
LLColor4U color{};
if (tep)
{
color = tep->getGLTFRenderMaterial()->mBaseColor;
color = tep->getColor();
if (tep->getGLTFRenderMaterial())
{
color = tep->getGLTFRenderMaterial()->mBaseColor;
}
}
if (rebuild_color)