aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llsurfacepatch.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llsurfacepatch.cpp')
-rw-r--r--linden/indra/newview/llsurfacepatch.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/linden/indra/newview/llsurfacepatch.cpp b/linden/indra/newview/llsurfacepatch.cpp
index 66d100f..4452eb1 100644
--- a/linden/indra/newview/llsurfacepatch.cpp
+++ b/linden/indra/newview/llsurfacepatch.cpp
@@ -4,6 +4,7 @@
4 * 4 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 5 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 6 *
7 * Second Life Viewer Source Code
7 * The source code in this file ("Source Code") is provided by Linden Lab 8 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0 9 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement 10 * ("GPL"), unless you have obtained a separate licensing agreement
@@ -202,6 +203,11 @@ LLVector2 LLSurfacePatch::getTexCoords(const U32 x, const U32 y) const
202void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3 *vertex, LLVector3 *normal, 203void LLSurfacePatch::eval(const U32 x, const U32 y, const U32 stride, LLVector3 *vertex, LLVector3 *normal,
203 LLVector2 *tex0, LLVector2 *tex1) 204 LLVector2 *tex0, LLVector2 *tex1)
204{ 205{
206 if (!mSurfacep || !mSurfacep->getRegion())
207 {
208 return; // failsafe
209 }
210
205 U32 surface_stride = mSurfacep->getGridsPerEdge(); 211 U32 surface_stride = mSurfacep->getGridsPerEdge();
206 U32 point_offset = x + y*surface_stride; 212 U32 point_offset = x + y*surface_stride;
207 213