diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index 5c291b69fcc11119145d497ace932c179b131592..a3837fe10c68d3758bfbdada979edbe4402d7f84 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 5656eb147157175ce7e642e0b8d3f70cd1e781ae..29d855fb93f032fa7fa52e3402b65402e83fdeff 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 135770c99cbadeeae0391392311569e97f0f4bc3..2b05f4c4532ae77301a51ae2a5061a7d0a941ef8 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();