diff options
| author | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-05-20 23:30:07 +0300 |
|---|---|---|
| committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2026-05-22 18:36:10 +0300 |
| commit | ec6fd95582a488dc156b0baa1487fc05f7f616f6 (patch) | |
| tree | 401972fcc0a47471dcd3d8080b11c246ca50254b /indra/newview/lldrawpool.cpp | |
| parent | 44b8fa43033eda21aaa8aa2014958effc233e044 (diff) | |
#5846 Fix crash on pushBatch
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
| -rw-r--r-- | indra/newview/lldrawpool.cpp | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index e60b3eb5dc..cc702e8f56 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -440,7 +440,11 @@ void LLRenderPass::pushBatches(U32 type, bool texture, bool batch_textures) LLDrawInfo* pparams = *i; LLCullResult::increment_iterator(i, end); - pushBatch(*pparams, texture, batch_textures); + llassert(pparams); // figure out how null got here, it shouldn't be happening + if (pparams) + { + pushBatch(*pparams, texture, batch_textures); + } } } else @@ -459,7 +463,10 @@ void LLRenderPass::pushUntexturedBatches(U32 type) LLDrawInfo* pparams = *i; LLCullResult::increment_iterator(i, end); - pushUntexturedBatch(*pparams); + if (pparams) + { + pushUntexturedBatch(*pparams); + } } } @@ -479,7 +486,7 @@ void LLRenderPass::pushRiggedBatches(U32 type, bool texture, bool batch_textures LLDrawInfo* pparams = *i; LLCullResult::increment_iterator(i, end); - if (uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin)) + if (pparams && uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin)) { pushBatch(*pparams, texture, batch_textures); } @@ -504,7 +511,7 @@ void LLRenderPass::pushUntexturedRiggedBatches(U32 type) LLDrawInfo* pparams = *i; LLCullResult::increment_iterator(i, end); - if (uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin)) + if (pparams && uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin)) { pushUntexturedBatch(*pparams); } @@ -520,8 +527,11 @@ void LLRenderPass::pushMaskBatches(U32 type, bool texture, bool batch_textures) { LLDrawInfo* pparams = *i; LLCullResult::increment_iterator(i, end); - LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(pparams->mAlphaMaskCutoff); - pushBatch(*pparams, texture, batch_textures); + if (pparams) + { + LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(pparams->mAlphaMaskCutoff); + pushBatch(*pparams, texture, batch_textures); + } } } @@ -539,13 +549,16 @@ void LLRenderPass::pushRiggedMaskBatches(U32 type, bool texture, bool batch_text LLCullResult::increment_iterator(i, end); - llassert(pparams); - - LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(pparams->mAlphaMaskCutoff); + llassert(pparams); // figure out how null got here, it shouldn't be happening - if (uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin)) + if (pparams) { - pushBatch(*pparams, texture, batch_textures); + LLGLSLShader::sCurBoundShaderPtr->setMinimumAlpha(pparams->mAlphaMaskCutoff); + + if (uploadMatrixPalette(pparams->mAvatar, pparams->mSkinInfo, lastAvatar, lastMeshId, skipLastSkin)) + { + pushBatch(*pparams, texture, batch_textures); + } } } } |
