diff --git a/indra/lscript/lscript_library.h b/indra/lscript/lscript_library.h
index 007d36fbcd6e27db7eb3f652409a9f3ff93de68d..ed6e3bc1defb4ffa4201219ed59c6d5ae8c521ea 100644
--- a/indra/lscript/lscript_library.h
+++ b/indra/lscript/lscript_library.h
@@ -407,11 +407,11 @@ class LLScriptLibData
 		}
 	}
 
-	LLScriptLibData(LLVector3 &vec) : mType(LST_VECTOR), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(vec), mQuat(), mListp(NULL)
+	LLScriptLibData(const LLVector3 &vec) : mType(LST_VECTOR), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(vec), mQuat(), mListp(NULL)
 	{
 	}
 
-	LLScriptLibData(LLQuaternion &quat) : mType(LST_QUATERNION), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(), mQuat(quat), mListp(NULL)
+	LLScriptLibData(const LLQuaternion &quat) : mType(LST_QUATERNION), mInteger(0), mFP(0.f), mKey(NULL), mString(NULL), mVec(), mQuat(quat), mListp(NULL)
 	{
 	}
 
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index a09ce3011f5213346fa4c4bbda9ef832450f22db..bd8ac806f58b2395db44a96f45d6e43fc001e278 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -1406,8 +1406,14 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
 				// Unpack particle system data
 				//
 				if (value & 0x8)
+				{
 					unpackParticleSource(*dp, owner_id);
-
+				}
+				else
+				{
+					deleteParticleSource();
+				}
+				
 				// Mark all extra parameters not used
 				std::map<U16, ExtraParameter*>::iterator iter;
 				for (iter = mExtraParameterList.begin(); iter != mExtraParameterList.end(); ++iter)
@@ -4063,6 +4069,15 @@ void LLViewerObject::unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_
 	}
 }
 
+void LLViewerObject::deleteParticleSource()
+{
+	if (mPartSourcep.notNull())
+	{
+		mPartSourcep->setDead();
+		mPartSourcep = NULL;
+	}
+}
+
 // virtual
 void LLViewerObject::updateDrawable(BOOL force_damped)
 {
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 80d32409043195edd07d27dbf0947ad042a31115..3e885233fd51771bc59abb766c6ac2acab2bba5d 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -527,6 +527,7 @@ class LLViewerObject : public LLPrimitive, public LLRefCount
 
 	void unpackParticleSource(const S32 block_num, const LLUUID& owner_id);
 	void unpackParticleSource(LLDataPacker &dp, const LLUUID& owner_id);
+	void deleteParticleSource();
 
 private:
 	void setNameValueList(const std::string& list);		// clears nv pairs and then individually adds \n separated NV pairs from \0 terminated string