From 63aef899bc6274d2b7fd90de8ed7e01cb6bb7359 Mon Sep 17 00:00:00 2001
From: Tofu Linden <tofu.linden@lindenlab.com>
Date: Wed, 27 Jan 2010 16:49:51 -0800
Subject: [PATCH] CID-365

Checker: UNINIT_CTOR
Function: LLSurfacePatch::LLSurfacePatch()
File: /indra/newview/llsurfacepatch.cpp
---
 indra/newview/llsurfacepatch.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp
index 0ce794addb6..48e4a6ccc75 100644
--- a/indra/newview/llsurfacepatch.cpp
+++ b/indra/newview/llsurfacepatch.cpp
@@ -60,6 +60,7 @@ LLSurfacePatch::LLSurfacePatch() :
 	mHeightsGenerated(FALSE),
 	mDataOffset(0),
 	mDataZ(NULL),
+	mDataNorm(NULL),
 	mVObjp(NULL),
 	mOriginRegion(0.f, 0.f, 0.f),
 	mCenterRegion(0.f, 0.f, 0.f),
@@ -355,12 +356,14 @@ void LLSurfacePatch::calcNormal(const U32 x, const U32 y, const U32 stride)
 	normal %= c2;
 	normal.normVec();
 
+	llassert(mDataNorm);
 	*(mDataNorm + surface_stride * y + x) = normal;
 }
 
 const LLVector3 &LLSurfacePatch::getNormal(const U32 x, const U32 y) const
 {
 	U32 surface_stride = mSurfacep->getGridsPerEdge();
+	llassert(mDataNorm);
 	return *(mDataNorm + surface_stride * y + x);
 }
 
@@ -402,6 +405,7 @@ void LLSurfacePatch::updateVerticalStats()
 	U32 i, j, k;
 	F32 z, total;
 
+	llassert(mDataZ);
 	z = *(mDataZ);
 
 	mMinZ = z;
-- 
GitLab