diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-06-12 11:21:15 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-06-12 16:38:39 +0300 |
commit | 8b18906f6c9d0778dac4ca0a7f58d6189a33f470 (patch) | |
tree | 68ff3ebf937765d7f41ef11a26bf588087584a6a /indra/newview/lldrawpool.cpp | |
parent | ba160edb8179750622a23d80155787181ce8c0e0 (diff) |
viewer#1730 Crash in LLFetchedGLTFMaterial::bind
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rw-r--r-- | indra/newview/lldrawpool.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 2d44949c4a..bede506a7f 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -756,9 +756,12 @@ void LLRenderPass::pushGLTFBatch(LLDrawInfo& params) { auto& mat = params.mGLTFMaterial; - mat->bind(params.mTexture); + if (mat.notNull()) + { + mat->bind(params.mTexture); + } - LLGLDisable cull_face(mat->mDoubleSided ? GL_CULL_FACE : 0); + LLGLDisable cull_face(mat.notNull() && mat->mDoubleSided ? GL_CULL_FACE : 0); setup_texture_matrix(params); |