summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llmaterial.h6
-rw-r--r--indra/llprimitive/lltextureentry.cpp4
2 files changed, 8 insertions, 2 deletions
diff --git a/indra/llprimitive/llmaterial.h b/indra/llprimitive/llmaterial.h
index fd35045e45..dc3484309c 100644
--- a/indra/llprimitive/llmaterial.h
+++ b/indra/llprimitive/llmaterial.h
@@ -32,8 +32,10 @@
#include "llmaterialid.h"
#include "llsd.h"
#include "v4coloru.h"
+#include "llpointer.h"
+#include "llrefcount.h"
-class LLMaterial
+class LLMaterial : public LLRefCount
{
public:
@@ -115,6 +117,6 @@ protected:
U8 mAlphaMaskCutoff;
};
-typedef boost::shared_ptr<LLMaterial> LLMaterialPtr;
+typedef LLPointer<LLMaterial> LLMaterialPtr;
#endif // LL_LLMATERIAL_H
diff --git a/indra/llprimitive/lltextureentry.cpp b/indra/llprimitive/lltextureentry.cpp
index 23b15b697c..691216e035 100644
--- a/indra/llprimitive/lltextureentry.cpp
+++ b/indra/llprimitive/lltextureentry.cpp
@@ -535,6 +535,10 @@ S32 LLTextureEntry::setMaterialID(const LLMaterialID& pMaterialID)
if (mMaterialID != pMaterialID)
{
mMaterialID = pMaterialID;
+ if (mMaterialID.isNull())
+ {
+ setMaterialParams(NULL);
+ }
return TEM_CHANGE_TEXTURE;
}
return TEM_CHANGE_NONE;