From c07901e29ed545bbb02e3bddf148fe1104b94e9f Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:56 -0500 Subject: Second Life viewer sources 1.15.1.3 --- linden/indra/newview/llvopartgroup.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'linden/indra/newview/llvopartgroup.cpp') diff --git a/linden/indra/newview/llvopartgroup.cpp b/linden/indra/newview/llvopartgroup.cpp index 28aeb29..fbf753a 100644 --- a/linden/indra/newview/llvopartgroup.cpp +++ b/linden/indra/newview/llvopartgroup.cpp @@ -151,7 +151,7 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) if (!num_parts) { - if (drawable->getNumFaces()) + if (group && drawable->getNumFaces()) { group->dirtyGeom(); } @@ -206,6 +206,12 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) count++; facep = drawable->getFace(i); + if (!facep) + { + llwarns << "No face found for index " << i << "!" << llendl; + continue; + } + facep->setTEOffset(i); const F32 NEAR_PART_DIST_SQ = 5.f*5.f; // Only discard particles > 5 m from the camera const F32 MIN_PART_AREA = .005f*.005f; // only less than 5 mm x 5 mm at 1 m from camera @@ -259,6 +265,11 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) for (i = count; i < drawable->getNumFaces(); i++) { LLFace* facep = drawable->getFace(i); + if (!facep) + { + llwarns << "No face found for index " << i << "!" << llendl; + continue; + } facep->setTEOffset(i); facep->setSize(0,0); } -- cgit v1.1