diff options
author | Rider Linden <rider@lindenlab.com> | 2017-10-17 14:40:59 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2017-10-17 14:40:59 -0700 |
commit | cf74a9438aae7ab1b10c7ffa77c6509e588869a0 (patch) | |
tree | 79c2714ba2bb2e0d526b5644f5b832c911fe6900 /indra/llmath | |
parent | 24ed3844afe2d54a03975c1704c595cf02e5643f (diff) | |
parent | 5754493cdcfeac76d0576abc19bdf5a03717780d (diff) |
Merge
Diffstat (limited to 'indra/llmath')
-rw-r--r-- | indra/llmath/llvolume.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 274ec50f20..44a33d9bc3 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -5311,19 +5311,31 @@ void LLVolumeFace::cacheOptimize() S32 num_verts = mNumVertices; S32 size = ((num_verts*sizeof(LLVector2)) + 0xF) & ~0xF; LLVector4a* pos = (LLVector4a*) ll_aligned_malloc<64>(sizeof(LLVector4a)*2*num_verts+size); + if (pos == NULL) + { + LL_ERRS("LLVOLUME") << "Allocation of positions vector[" << sizeof(LLVector4a) * 2 * num_verts + size << "] failed. " << LL_ENDL; + } LLVector4a* norm = pos + num_verts; LLVector2* tc = (LLVector2*) (norm + num_verts); LLVector4a* wght = NULL; if (mWeights) { - wght = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); + wght = (LLVector4a*)ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); + if (wght == NULL) + { + LL_ERRS("LLVOLUME") << "Allocation of weights[" << sizeof(LLVector4a) * num_verts << "] failed" << LL_ENDL; + } } LLVector4a* binorm = NULL; if (mTangents) { binorm = (LLVector4a*) ll_aligned_malloc_16(sizeof(LLVector4a)*num_verts); + if (binorm == NULL) + { + LL_ERRS("LLVOLUME") << "Allocation of binormals[" << sizeof(LLVector4a)*num_verts << "] failed" << LL_ENDL; + } } //allocate mapping of old indices to new indices |