summaryrefslogtreecommitdiff
path: root/indra/newview/lltextureview.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-03-17 13:35:39 -0400
committerLoren Shih <seraph@lindenlab.com>2010-03-17 13:35:39 -0400
commit6e761bb5f2fac9155b03b74008cfca141968ae6c (patch)
tree8fa1dcf8f2f6edae67e832dc34a6286901ae771d /indra/newview/lltextureview.cpp
parenta5c43859c355afbb5a24d8599756297cad07f590 (diff)
parent509457b8ef7bfb8e5b6dcb1a25996ae8fe329007 (diff)
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/lltextureview.cpp')
-rw-r--r--indra/newview/lltextureview.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 6cd8a78b25..43913f3632 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -660,8 +660,9 @@ struct compare_decode_pair
struct KillView
{
- void operator()(LLView* viewp) const
+ void operator()(LLView* viewp)
{
+ viewp->getParent()->removeChild(viewp);
viewp->die();
}
};
@@ -676,8 +677,12 @@ void LLTextureView::draw()
for_each(mTextureBars.begin(), mTextureBars.end(), KillView());
mTextureBars.clear();
- delete mGLTexMemBar;
- mGLTexMemBar = 0;
+ if (mGLTexMemBar)
+ {
+ removeChild(mGLTexMemBar);
+ mGLTexMemBar->die();
+ mGLTexMemBar = 0;
+ }
typedef std::multiset<decode_pair_t, compare_decode_pair > display_list_t;
display_list_t display_image_list;