diff options
author | Ansariel <ansariel.hiller@phoenixviewer.com> | 2024-06-10 18:25:45 +0200 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2024-06-10 19:31:05 +0300 |
commit | 32fcefc058ae38eff0572326ef3efd1c7b343144 (patch) | |
tree | 46122fcbec80c435f2963f10c6697417f8deccdd /indra/newview/llface.cpp | |
parent | 4b52dd754b41948efca0087ccac6d813f1fcce3f (diff) |
Fix possible null pointer crash
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r-- | indra/newview/llface.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 1ce7454071..bb89863450 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -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) |