diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-04-07 14:17:30 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-04-07 14:17:30 +0300 |
commit | e20aafa2fe200cecf1f4d3ae31294ba0eb5ce194 (patch) | |
tree | 0c0625e07093e673ba9133665af1686f266584ce /indra/newview | |
parent | bc7dc2f94985658595093d4619b4a0ad25f2ff37 (diff) |
SL-16907 Crash at updateSkinInfoMatrixPalette #2
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/lldrawpool.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lldrawpoolalpha.cpp | 4 | ||||
-rw-r--r-- | indra/newview/lldrawpoolmaterials.cpp | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 5c291b69fc..a3837fe10c 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -596,6 +596,10 @@ bool LLRenderPass::uploadMatrixPalette(LLDrawInfo& params) //static bool LLRenderPass::uploadMatrixPalette(LLVOAvatar* avatar, LLMeshSkinInfo* skinInfo) { + if (!avatar) + { + return false; + } const LLVOAvatar::MatrixPaletteCache& mpc = avatar->updateSkinInfoMatrixPalette(skinInfo); U32 count = mpc.mMatrixPalette.size(); diff --git a/indra/newview/lldrawpoolalpha.cpp b/indra/newview/lldrawpoolalpha.cpp index 5656eb1471..29d855fb93 100644 --- a/indra/newview/lldrawpoolalpha.cpp +++ b/indra/newview/lldrawpoolalpha.cpp @@ -796,6 +796,10 @@ void LLDrawPoolAlpha::renderAlpha(U32 mask, bool depth_only, bool rigged) bool LLDrawPoolAlpha::uploadMatrixPalette(const LLDrawInfo& params) { + if (params.mAvatar.isNull()) + { + return false; + } const LLVOAvatar::MatrixPaletteCache& mpc = params.mAvatar.get()->updateSkinInfoMatrixPalette(params.mSkinInfo); U32 count = mpc.mMatrixPalette.size(); diff --git a/indra/newview/lldrawpoolmaterials.cpp b/indra/newview/lldrawpoolmaterials.cpp index 135770c99c..2b05f4c453 100644 --- a/indra/newview/lldrawpoolmaterials.cpp +++ b/indra/newview/lldrawpoolmaterials.cpp @@ -243,7 +243,7 @@ void LLDrawPoolMaterials::pushMaterialsBatch(LLDrawInfo& params, U32 mask, bool } // upload matrix palette to shader - if (rigged) + if (rigged && params.mAvatar.notNull()) { const LLVOAvatar::MatrixPaletteCache& mpc = params.mAvatar->updateSkinInfoMatrixPalette(params.mSkinInfo); U32 count = mpc.mMatrixPalette.size(); |