diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-04-29 15:23:03 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-04-29 15:23:03 -0600 |
commit | d7954ba38f81172f0062ae55479aff0709615bdd (patch) | |
tree | 63c9f14bf5a1bd6a054f3ef29a8df47862db7638 /indra/llprimitive/llmodel.cpp | |
parent | d2d07046b7f0ee25928c01afa8da85b7b103afa7 (diff) |
fix for SH-688: Viewer crash when uploading a large .dae file and clicking the X button in upper right hand corner of the upload model floater on Mac Build
Diffstat (limited to 'indra/llprimitive/llmodel.cpp')
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 5af1122451..794cdb83d5 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -232,27 +232,16 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa domPRef p = tri->getP(); domListOfUInts& idx = p->getValue(); - domListOfFloats v; - domListOfFloats tc; - domListOfFloats n; + domListOfFloats dummy ; + domListOfFloats& v = pos_source ? pos_source->getFloat_array()->getValue() : dummy ; + domListOfFloats& tc = tc_source ? tc_source->getFloat_array()->getValue() : dummy ; + domListOfFloats& n = norm_source ? norm_source->getFloat_array()->getValue() : dummy ; if (pos_source) { - v = pos_source->getFloat_array()->getValue(); face.mExtents[0].set(v[0], v[1], v[2]); face.mExtents[1].set(v[0], v[1], v[2]); } - - if (tc_source) - { - tc = tc_source->getFloat_array()->getValue(); - } - - if (norm_source) - { - n = norm_source->getFloat_array()->getValue(); - } - LLVolumeFace::VertexMapData::PointMap point_map; |