diff options
author | simon <none@none> | 2014-06-18 19:02:25 -0700 |
---|---|---|
committer | simon <none@none> | 2014-06-18 19:02:25 -0700 |
commit | d760a6889dbe1ca5ff0775343a6a01f735ec740b (patch) | |
tree | 421a79d29dec1544c0347635113202a4bc7ba18a /indra/newview/lllocalbitmaps.cpp | |
parent | 3686dc3e37511009be02b61edcd483cb9a032b1b (diff) | |
parent | 592024b5805a116c9d0bef893127427df0741b41 (diff) |
Merge downstream code
Diffstat (limited to 'indra/newview/lllocalbitmaps.cpp')
-rwxr-xr-x | indra/newview/lllocalbitmaps.cpp | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp index c5c5d10a0c..897ee8429a 100755 --- a/indra/newview/lllocalbitmaps.cpp +++ b/indra/newview/lllocalbitmaps.cpp @@ -192,7 +192,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; } @@ -208,15 +208,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; @@ -543,7 +546,7 @@ void LLLocalBitmap::updateUserLayers(LLUUID old_id, LLUUID new_id, LLWearableTyp { U32 index = gAgentWearables.getWearableIndex(wearable); gAgentAvatarp->setLocalTexture(reg_texind, gTextureList.getImage(new_id), FALSE, index); - gAgentAvatarp->wearableUpdated(type, FALSE); + gAgentAvatarp->wearableUpdated(type); /* telling the manager to rebake once update cycle is fully done */ LLLocalBitmapMgr::setNeedsRebake(); @@ -826,6 +829,12 @@ LLLocalBitmapMgr::~LLLocalBitmapMgr() { } +void LLLocalBitmapMgr::cleanupClass() +{ + std::for_each(sBitmapList.begin(), sBitmapList.end(), DeletePointer()); + sBitmapList.clear(); +} + bool LLLocalBitmapMgr::addUnit() { bool add_successful = false; |