diff options
author | Aura Linden <aura@lindenlab.com> | 2015-10-01 09:32:06 -0700 |
---|---|---|
committer | Aura Linden <aura@lindenlab.com> | 2015-10-01 09:32:06 -0700 |
commit | a4fef135b110045500d9afc1b558127bc2f5cd89 (patch) | |
tree | 8434799fcaf9f4e8b60be972fea8ea3165570c46 /indra | |
parent | 5460c0f4c80660f93723a80d464c0a5ebd97921a (diff) |
Fixed mac assert problem on RelWithDebInfo for uploading models.
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llmath/llvolume.cpp | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index cd417c913d..191a6b38cb 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6100,18 +6100,21 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con mNormals = mPositions+new_verts; mTexCoords = (LLVector2*) (mNormals+new_verts); - //positions - LLVector4a::memcpyNonAliased16((F32*) mPositions, (F32*) old_buf, old_vsize); - - //normals - LLVector4a::memcpyNonAliased16((F32*) mNormals, (F32*) (old_buf+mNumVertices), old_vsize); + if (old_buf) + { + //positions + LLVector4a::memcpyNonAliased16((F32*) mPositions, (F32*) old_buf, old_vsize); + + //normals + LLVector4a::memcpyNonAliased16((F32*) mNormals, (F32*) (old_buf+mNumVertices), old_vsize); - //tex coords - LLVector4a::memcpyNonAliased16((F32*) mTexCoords, (F32*) (old_buf+mNumVertices*2), old_tc_size); + //tex coords + LLVector4a::memcpyNonAliased16((F32*) mTexCoords, (F32*) (old_buf+mNumVertices*2), old_tc_size); + } - //just clear tangents - ll_aligned_free_16(mTangents); - mTangents = NULL; + //just clear tangents + ll_aligned_free_16(mTangents); + mTangents = NULL; ll_aligned_free<64>(old_buf); mNumAllocatedVertices = new_verts; |