summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpool.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2024-06-12 11:21:15 +0300
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2024-06-12 18:12:35 +0300
commit718189085a1a5c6334bae8e79ef913323338600e (patch)
tree63de7709e89b116becf59cfaad002f9281db6c29 /indra/newview/lldrawpool.cpp
parentf1a756bd76765233451f16613f058d49f0a2595a (diff)
viewer#1730 Crash in LLFetchedGLTFMaterial::bind
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rw-r--r--indra/newview/lldrawpool.cpp7
1 files changed, 5 insertions, 2 deletions
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);