summaryrefslogtreecommitdiff
path: root/indra/newview/lllocalbitmaps.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-08-06 09:22:43 -0700
committerdolphin <dolphin@lindenlab.com>2014-08-06 09:22:43 -0700
commit81c342dfa9ac04378e22c76f119408e6e00c0f13 (patch)
tree728de42a95d436d7a753bf3884d683d4201b5ad0 /indra/newview/lllocalbitmaps.cpp
parent3b2f456416d29534cb41fc9d4ad3bf195dcfc847 (diff)
parent1346949e4d601e8c945fa30593ba1d405e9ed80d (diff)
Merge with 3.7.13-release
Diffstat (limited to 'indra/newview/lllocalbitmaps.cpp')
-rwxr-xr-xindra/newview/lllocalbitmaps.cpp17
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;