Do not pre- increment the loop iterator in LLView::drawChildren
This is in fact much safer, because the only way to invalidate an interator in the first place (in this code) is by calling removeChild, which *already* has an assert never to remove a child that is being iterated over (by means of the mInDraw flag).
This commit is contained in:
@@ -1170,16 +1170,13 @@ void LLView::drawChildren()
|
||||
LLView* rootp = getRootView();
|
||||
++sDepth;
|
||||
|
||||
for (child_list_reverse_iter_t child_iter = mChildList.rbegin(); child_iter != mChildList.rend();) // ++child_iter)
|
||||
for (child_list_const_reverse_iter_t child_iter = mChildList.rbegin(); child_iter != mChildList.rend(); ++child_iter)
|
||||
{
|
||||
child_list_reverse_iter_t child = child_iter++;
|
||||
LLView *viewp = *child;
|
||||
|
||||
if (viewp == NULL)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
LLView *viewp = *child_iter;
|
||||
if (viewp == NULL)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (viewp->getVisible() && /*viewp != focus_view && */viewp->getRect().isValid())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user