diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-11 12:59:23 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-01-11 12:59:23 -0500 |
commit | 32a9255d8ce7515be0fd8c566cb4085a03d99e2b (patch) | |
tree | ed2136972d17069173468c128231e14fc3dd1796 /indra/llui/llview.cpp | |
parent | bfe6e94f5388b887253ba77f633ae332affe9f92 (diff) | |
parent | 3dfb1536fa3bb85f6648a76591e80c3feea9eb83 (diff) |
merge
Diffstat (limited to 'indra/llui/llview.cpp')
-rw-r--r-- | indra/llui/llview.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llui/llview.cpp b/indra/llui/llview.cpp index 486babb0ab..542f57ee5f 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), @@ -281,6 +282,9 @@ void LLView::moveChildToBackOfTabGroup(LLUICtrl* child) // virtual bool LLView::addChild(LLView* child, S32 tab_group) { + // NOTE: Changed this to not crash in release mode + llassert(mInDraw == false); + if (!child) { return false; @@ -330,6 +334,7 @@ bool LLView::addChildInBack(LLView* child, S32 tab_group) // remove the specified child from the view, and set it's parent to NULL. void LLView::removeChild(LLView* child) { + llassert_always(mInDraw == false); //llassert_always(sDepth == 0); // Avoid re-ordering while drawing; it can cause subtle iterator bugs if (child->mParentView == this) { @@ -1081,6 +1086,7 @@ void LLView::draw() void LLView::drawChildren() { + mInDraw = true; if (!mChildList.empty()) { LLView* rootp = LLUI::getRootView(); @@ -1119,6 +1125,7 @@ void LLView::drawChildren() } --sDepth; } + mInDraw = false; } void LLView::dirtyRect() |