diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llvopartgroup.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
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) | |||
151 | 151 | ||
152 | if (!num_parts) | 152 | if (!num_parts) |
153 | { | 153 | { |
154 | if (drawable->getNumFaces()) | 154 | if (group && drawable->getNumFaces()) |
155 | { | 155 | { |
156 | group->dirtyGeom(); | 156 | group->dirtyGeom(); |
157 | } | 157 | } |
@@ -206,6 +206,12 @@ BOOL LLVOPartGroup::updateGeometry(LLDrawable *drawable) | |||
206 | count++; | 206 | count++; |
207 | 207 | ||
208 | facep = drawable->getFace(i); | 208 | facep = drawable->getFace(i); |
209 | if (!facep) | ||
210 | { | ||
211 | llwarns << "No face found for index " << i << "!" << llendl; | ||
212 | continue; | ||
213 | } | ||
214 | |||
209 | facep->setTEOffset(i); | 215 | facep->setTEOffset(i); |
210 | const F32 NEAR_PART_DIST_SQ = 5.f*5.f; // Only discard particles > 5 m from the camera | 216 | const F32 NEAR_PART_DIST_SQ = 5.f*5.f; // Only discard particles > 5 m from the camera |
211 | const F32 MIN_PART_AREA = .005f*.005f; // only less than 5 mm x 5 mm at 1 m from camera | 217 | 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) | |||
259 | for (i = count; i < drawable->getNumFaces(); i++) | 265 | for (i = count; i < drawable->getNumFaces(); i++) |
260 | { | 266 | { |
261 | LLFace* facep = drawable->getFace(i); | 267 | LLFace* facep = drawable->getFace(i); |
268 | if (!facep) | ||
269 | { | ||
270 | llwarns << "No face found for index " << i << "!" << llendl; | ||
271 | continue; | ||
272 | } | ||
262 | facep->setTEOffset(i); | 273 | facep->setTEOffset(i); |
263 | facep->setSize(0,0); | 274 | facep->setSize(0,0); |
264 | } | 275 | } |