From a415b34c285cfa19e16503a884977230b787e5ab Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 1 Oct 2013 20:02:45 -0400 Subject: [PATCH] Fix a crash noticed while working on the last commit, when asserts aren't always, we should return before using null pointers. --- indra/newview/llsurfacepatch.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/indra/newview/llsurfacepatch.cpp b/indra/newview/llsurfacepatch.cpp index c2466c5e1..ff99580e6 100644 --- a/indra/newview/llsurfacepatch.cpp +++ b/indra/newview/llsurfacepatch.cpp @@ -881,6 +881,7 @@ void LLSurfacePatch::setOriginGlobal(const LLVector3d &origin_global) void LLSurfacePatch::connectNeighbor(LLSurfacePatch *neighbor_patchp, const U32 direction) { llassert(neighbor_patchp); + if (!neighbor_patchp) return; mNormalsInvalid[direction] = TRUE; neighbor_patchp->mNormalsInvalid[gDirOpposite[direction]] = TRUE;