diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index 71caff1686938dfd99b20c61443b25503f1210d4..fb5807266df5688484c501bf1ee05e719d3ccc64 100644
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -562,7 +562,7 @@ void LLTextureEntry::setGLTFMaterial(LLGLTFMaterial* material, bool local_origin
 S32 LLTextureEntry::setGLTFMaterialOverride(LLGLTFMaterial* mat)
 { 
     llassert(mat == nullptr || getGLTFMaterial() != nullptr); // if override is not null, base material must not be null
-    if (mat == mGLTFMaterialOverrides)
+    if (mat == mGLTFMaterialOverrides.get())
     {
         return TEM_CHANGE_NONE;
     }