diff options
author | Aura Linden <aura@lindenlab.com> | 2014-07-22 18:23:48 -0700 |
---|---|---|
committer | Aura Linden <aura@lindenlab.com> | 2014-07-22 18:23:48 -0700 |
commit | f61671aec7a15160f906650b4c7449be68c7b074 (patch) | |
tree | 1c8f08f04d137f41c5b8cbf9a579161ff0dd3538 /indra/newview/lllocalbitmaps.cpp | |
parent | 3d4acb535d75c4cc78c93dee318bcffaca691237 (diff) | |
parent | 532433674c9553636af9ea8d433b9da6d6fae587 (diff) |
Merged in release.
Diffstat (limited to 'indra/newview/lllocalbitmaps.cpp')
-rwxr-xr-x | indra/newview/lllocalbitmaps.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index 8e4950f5c2..b91e37d596 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -190,7 +190,7 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) { // decode is successful, we can safely proceed. LLUUID old_id = LLUUID::null; - if (!(optional_firstupdate == UT_FIRSTUSE) && !mWorldID.isNull()) + if ((optional_firstupdate != UT_FIRSTUSE) && !mWorldID.isNull()) { old_id = mWorldID; } @@ -206,15 +206,18 @@ bool LLLocalBitmap::updateSelf(EUpdateType optional_firstupdate) gTextureList.addImage(texture); - if (!optional_firstupdate == UT_FIRSTUSE) + if (optional_firstupdate != UT_FIRSTUSE) { // seek out everything old_id uses and replace it with mWorldID replaceIDs(old_id, mWorldID); // remove old_id from gimagelist LLViewerFetchedTexture* image = gTextureList.findImage(old_id); - gTextureList.deleteImage(image); - image->unref(); + if (image != NULL) + { + gTextureList.deleteImage(image); + image->unref(); + } } mUpdateRetries = LL_LOCAL_UPDATE_RETRIES; @@ -824,6 +827,12 @@ LLLocalBitmapMgr::~LLLocalBitmapMgr() { } +void LLLocalBitmapMgr::cleanupClass() +{ + std::for_each(sBitmapList.begin(), sBitmapList.end(), DeletePointer()); + sBitmapList.clear(); +} + bool LLLocalBitmapMgr::addUnit() { bool add_successful = false; |