diff --git a/indra/llprimitive/llprimtexturelist.cpp b/indra/llprimitive/llprimtexturelist.cpp
index f4f08248b82dde355796be88bd2abce6c72abc59..854003d42b1552aecd539507eb586958dc2952d4 100644
--- a/indra/llprimitive/llprimtexturelist.cpp
+++ b/indra/llprimitive/llprimtexturelist.cpp
@@ -137,7 +137,7 @@ S32 LLPrimTextureList::copyTexture(const U8 index, const LLTextureEntry& te)
 		// we're changing an existing entry
 	llassert(mEntryList[index]);
 	delete (mEntryList[index]);
-	if  (&te)
+	if  (te != LLTextureEntry::null)
 	{
 		mEntryList[index] = te.newCopy();
 	}