diff options
author | Don Kjer <don@lindenlab.com> | 2012-10-11 01:00:31 +0000 |
---|---|---|
committer | Don Kjer <don@lindenlab.com> | 2012-10-11 01:00:31 +0000 |
commit | 30aea02e8edf8234cdbf33ae065c61fc687b3a8b (patch) | |
tree | 0271f470a43a8ba3d3723e0ec0c35bba271568d6 /indra | |
parent | c06c35609c6683731eaea283468f6b32af18fea2 (diff) |
Fix for release build in gcc 4.6
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/llrender/llimagegl.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 16fe77a755..249b8da880 100755 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -744,7 +744,9 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) S32 w = width, h = height; const U8* prev_mip_data = 0; const U8* cur_mip_data = 0; +#ifdef SHOW_ASSERT S32 cur_mip_size = 0; +#endif mMipLevels = nummips; @@ -753,18 +755,24 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) if (m==0) { cur_mip_data = data_in; +#ifdef SHOW_ASSERT cur_mip_size = width * height * mComponents; +#endif } else { S32 bytes = w * h * mComponents; +#ifdef SHOW_ASSERT llassert(prev_mip_data); llassert(cur_mip_size == bytes*4); +#endif U8* new_data = new U8[bytes]; llassert_always(new_data); LLImageBase::generateMip(prev_mip_data, new_data, w, h, mComponents); cur_mip_data = new_data; +#ifdef SHOW_ASSERT cur_mip_size = bytes; +#endif } llassert(w > 0 && h > 0 && cur_mip_data); { |