diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-05-20 00:14:12 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-05-20 01:35:40 +0300 |
commit | d1265cda36f31d0273b0cd57e1e6c762dfc0b29f (patch) | |
tree | ce57291125a3a4691cf017ebfaa19180fe3b8bbe /indra/llui/llfloater.cpp | |
parent | ed74d15246ded84ded3a096046d79e95352b444e (diff) |
SL-17425 Crash when closing two dependent floaters
dependent_it in llfloater was not valid after dependent floater removed itself from the list
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r-- | indra/llui/llfloater.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 0e42922543..f4e395a0b8 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -761,17 +761,13 @@ void LLFloater::closeFloater(bool app_quitting) for(handle_set_iter_t dependent_it = mDependents.begin(); dependent_it != mDependents.end(); ) { - LLFloater* floaterp = dependent_it->get(); - if (floaterp) - { - ++dependent_it; - floaterp->closeFloater(app_quitting); - } - else - { - mDependents.erase(dependent_it++); - } + dependent_it = mDependents.erase(dependent_it); + if (floaterp) + { + floaterp->mDependeeHandle = LLHandle<LLFloater>(); + floaterp->closeFloater(app_quitting); + } } cleanupHandles(); @@ -1439,7 +1435,7 @@ void LLFloater::cleanupHandles() LLFloater* floaterp = dependent_it->get(); if (!floaterp) { - mDependents.erase(dependent_it++); + dependent_it = mDependents.erase(dependent_it); } else { |