diff options
author | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2014-10-27 17:10:08 +0200 |
---|---|---|
committer | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2014-10-27 17:10:08 +0200 |
commit | 366bcd0cbca43081fe58825fd463018e49b51740 (patch) | |
tree | 87ecb99f0a7d27ca4bd9effb94e0c9218379e84b /indra/llmath | |
parent | e3f62a54e6c3fe5423a1e766c4ee30388aa471bd (diff) |
MAINT-4435 FIXED fix in llvolume.cpp Perform full build if number of vertices
less than allowed. Changes in all other files relate auxiliary methods for
catching similar bugs in future.
Diffstat (limited to 'indra/llmath')
-rwxr-xr-x | indra/llmath/llmath.h | 1 | ||||
-rwxr-xr-x | indra/llmath/llvolume.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index b4ac1dec73..7f39e58f71 100755 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -559,6 +559,7 @@ inline void ll_remove_outliers(std::vector<VEC_TYPE>& data, F32 k) inline void ll_nn2d_interpolation(const U8 *const src, U32 srcW, U32 srcH, U8 srcCh, U8 *const dst, U32 dstW, U32 dstH, U8 dstCh) { + llassert(NULL != src && NULL != dst); llassert(srcCh>=dstCh); S32 tmp_x = 0, tmp_y = 0, tmp_x1 = 0, tmp_x2 = 0; diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index d9a68cb577..98ff36c363 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -6284,6 +6284,8 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build) num_vertices = mNumS*mNumT; num_indices = (mNumS-1)*(mNumT-1)*6; + partial_build = (num_vertices > mNumVertices || num_indices > mNumIndices) ? FALSE : partial_build; + if (!partial_build) { resizeVertices(num_vertices); |