From 718189085a1a5c6334bae8e79ef913323338600e Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 12 Jun 2024 11:21:15 +0300 Subject: viewer#1730 Crash in LLFetchedGLTFMaterial::bind --- indra/newview/lldrawpool.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/lldrawpool.cpp') diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 9ba4f7f300..739975eab4 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); -- cgit v1.2.3