diff options
-rwxr-xr-x | indra/llprimitive/llmodel.cpp | 19 | ||||
-rwxr-xr-x[-rw-r--r--] | indra/newview/pipeline.cpp | 5 |
2 files changed, 19 insertions, 5 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 1869e1dd47..3d03209eaf 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -950,6 +950,25 @@ void LLModel::normalizeVolumeFaces() LLVector4a size; size.setSub(max, min); + // Prevent division by zero. + F32 x = size[0]; + F32 y = size[1]; + F32 z = size[2]; + F32 w = size[3]; + if (fabs(x)<F_APPROXIMATELY_ZERO) + { + x = 1.0; + } + if (fabs(y)<F_APPROXIMATELY_ZERO) + { + y = 1.0; + } + if (fabs(z)<F_APPROXIMATELY_ZERO) + { + z = 1.0; + } + size.set(x,y,z,w); + // Compute scale as reciprocal of size LLVector4a scale; scale.splat(1.f); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c1b3ad99b2..38711472a1 100644..100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2495,11 +2495,6 @@ void LLPipeline::markRebuild(LLDrawable *drawablep, LLDrawable::EDrawableFlags f { LLMemType mt(LLMemType::MTYPE_PIPELINE_MARK_REBUILD); - if (drawablep) - { - LLVOVolume* volume = drawablep->getVOVolume(); - } - if (drawablep && !drawablep->isDead() && assertInitialized()) { if (!drawablep->isState(LLDrawable::BUILT)) |