summaryrefslogtreecommitdiff
path: root/indra/newview/lltextureview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lltextureview.cpp')
-rw-r--r--indra/newview/lltextureview.cpp27
1 files changed, 22 insertions, 5 deletions
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 98731f90f4..43913f3632 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -658,6 +658,15 @@ struct compare_decode_pair
}
};
+struct KillView
+{
+ void operator()(LLView* viewp)
+ {
+ viewp->getParent()->removeChild(viewp);
+ viewp->die();
+ }
+};
+
void LLTextureView::draw()
{
if (!mFreezeView)
@@ -665,12 +674,16 @@ void LLTextureView::draw()
// LLViewerObject *objectp;
// S32 te;
- for_each(mTextureBars.begin(), mTextureBars.end(), DeletePointer());
+ 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;
@@ -683,6 +696,10 @@ void LLTextureView::draw()
iter != gTextureList.mImageList.end(); )
{
LLPointer<LLViewerFetchedTexture> imagep = *iter++;
+ if(!imagep->hasFetcher())
+ {
+ continue ;
+ }
S32 cur_discard = imagep->getDiscardLevel();
S32 desired_discard = imagep->mDesiredDiscardLevel;