diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2010-03-10 17:37:00 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2010-03-10 17:37:00 -0700 |
commit | ebc63494b3a7791be00c91ca51387a73c975f912 (patch) | |
tree | 71c03c7d80f29a231cff43c5b5cf21bda088cb9a /indra | |
parent | 942eb0907352efe284623d36cc8e0b42cc1e7c40 (diff) | |
parent | fdfc59da9bd8767001fb1b137da0c3a354c87a92 (diff) |
Automated merge with ssh://hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llimage/llimage.cpp | 3 | ||||
-rw-r--r-- | indra/newview/lltexturecache.cpp | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index 5649b4cab7..7d0de18c7c 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -157,8 +157,9 @@ U8* LLImageBase::allocateData(S32 size) llerrs << llformat("LLImageBase::allocateData called with bad dimensions: %dx%dx%d",mWidth,mHeight,mComponents) << llendl; } } - else if (size <= 0 || (size > 4096*4096*16 && sSizeOverride == FALSE)) + if (size < 1 || (size > 4096*4096*16 && sSizeOverride == FALSE)) { + llinfos << "width: " << mWidth << " height: " << mHeight << " components: " << mComponents << llendl ; llerrs << "LLImageBase::allocateData: bad size: " << size << llendl; } diff --git a/indra/newview/lltexturecache.cpp b/indra/newview/lltexturecache.cpp index 4649b9cbef..49770030c6 100644 --- a/indra/newview/lltexturecache.cpp +++ b/indra/newview/lltexturecache.cpp @@ -1140,6 +1140,10 @@ void LLTextureCache::writeEntryAndClose(S32 idx, Entry& entry) { mTexturesSizeMap[entry.mID] = entry.mBodySize; } + else if(mTexturesSizeMap.find(entry.mID) != mTexturesSizeMap.end() && mTexturesSizeMap[entry.mID] > 0) + { + llerrs << "mTexturesSizeMap / mHeaderIDMap corrupted." << llendl ; + } // llinfos << "Updating TE: " << idx << ": " << id << " Size: " << entry.mBodySize << " Time: " << entry.mTime << llendl; mHeaderEntriesMaxWriteIdx = llmax(mHeaderEntriesMaxWriteIdx, idx); mUpdatedEntryMap[idx] = entry ; @@ -1450,6 +1454,10 @@ void LLTextureCache::purgeTextures(bool validate) time_idx_set.insert(std::make_pair(entries[idx].mTime, idx)); // llinfos << "TIME: " << entries[idx].mTime << " TEX: " << entries[idx].mID << " IDX: " << idx << " Size: " << entries[idx].mImageSize << llendl; } + else + { + llerrs << "mTexturesSizeMap / mHeaderIDMap corrupted." << llendl ; + } } } |