diff options
author | Debi King (Dessie) <dessie@lindenlab.com> | 2012-01-20 15:40:43 -0500 |
---|---|---|
committer | Debi King (Dessie) <dessie@lindenlab.com> | 2012-01-20 15:40:43 -0500 |
commit | 6298daf266369dbd3600c5fdf287f9c680b2a897 (patch) | |
tree | 270a7d6d12e444d739b85ad9d89e0001621b20a2 /indra/llui/llview.cpp | |
parent | 7c0b98aa83faacf27da2b71e186399e232a1a376 (diff) | |
parent | 0915ce7834f8e36c53e0790c2946b952a12a74c6 (diff) |
merge
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r-- | indra/llui/llview.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 486babb0ab..004681325f 100644 --- a/indra/llui/llview.cpp +++ b/indra/llui/llview.cpp @@ -121,6 +121,7 @@ LLView::Params::Params() LLView::LLView(const LLView::Params& p) : mVisible(p.visible), + mInDraw(false), mName(p.name), mParentView(NULL), mReshapeFlags(FOLLOWS_NONE), @@ -333,6 +334,8 @@ void LLView::removeChild(LLView* child) //llassert_always(sDepth == 0); // Avoid re-ordering while drawing; it can cause subtle iterator bugs if (child->mParentView == this) { + // if we are removing an item we are currently iterating over, that would be bad + llassert(child->mInDraw == false); mChildList.remove( child ); child->mParentView = NULL; if (child->isCtrl()) @@ -1099,7 +1102,10 @@ void LLView::drawChildren() LLUI::pushMatrix(); { LLUI::translate((F32)viewp->getRect().mLeft, (F32)viewp->getRect().mBottom, 0.f); + // flag the fact we are in draw here, in case overridden draw() method attempts to remove this widget + viewp->mInDraw = true; viewp->draw(); + viewp->mInDraw = false; if (sDebugRects) { |