summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-03-09 16:14:16 -0800
committerRichard Linden <none@none>2010-03-09 16:14:16 -0800
commit22b6436506550e7763a29fd0fecda4c610e3e97f (patch)
treef89c5b6af8d8f8c8ced480f4c0f31aaaa375fdcb /indra
parent978ae36b8668433c1c19d0088a8ccb653a5a1c48 (diff)
fix for texture view widget deletion spam
Diffstat (limited to 'indra')
-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;