diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index b0ac3c9436d032c0c82b77e622bfd2918afa06df..5068c9c685e4a3871829f17985448d8fd05e89a1 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -2032,13 +2032,8 @@ void LLPathParams::copyParams(const LLPathParams &params)
 	setSkew(params.getSkew());
 }
 
-S32 profile_delete_lock = 1 ; 
 LLProfile::~LLProfile()
 {
-	if(profile_delete_lock)
-	{
-		LL_ERRS() << "LLProfile should not be deleted here!" << LL_ENDL ;
-	}
 }
 
 
@@ -2103,9 +2098,7 @@ LLVolume::~LLVolume()
 	sNumMeshPoints -= mMesh.size();
 	delete mPathp;
 
-	profile_delete_lock = 0 ;
 	delete mProfilep;
-	profile_delete_lock = 1 ;
 
 	mPathp = NULL;
 	mProfilep = NULL;
diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h
index d66004cdadbc7ef370966497a0351fab69d0a28d..ec707a1b22c99479e9be41dcffd0d706bf8a3320 100644
--- a/indra/llmath/llvolume.h
+++ b/indra/llmath/llvolume.h
@@ -679,6 +679,8 @@ class LLVolumeParams
 
 class LLProfile
 {
+	friend class LLVolume;
+
 public:
 	LLProfile()
 		: mOpen(FALSE),
@@ -689,8 +691,6 @@ class LLProfile
 	{
 	}
 
-	~LLProfile();
-
 	S32	 getTotal() const								{ return mTotal; }
 	S32	 getTotalOut() const							{ return mTotalOut; }	// Total number of outside points
 	BOOL isFlat(S32 face) const							{ return (mFaces[face].mCount == 2); }
@@ -723,6 +723,8 @@ class LLProfile
 	friend std::ostream& operator<<(std::ostream &s, const LLProfile &profile);
 
 protected:
+	~LLProfile();
+
 	static S32 getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset=0.0f, F32 bevel = 0.0f, F32 ang_scale = 1.f, S32 split = 0);
 	void genNGon(const LLProfileParams& params, S32 sides, F32 offset=0.0f, F32 bevel = 0.0f, F32 ang_scale = 1.f, S32 split = 0);