summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-12 14:25:46 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-05-12 20:25:04 +0300
commit3917de54db0dacf2aaa4f8af083db632c6a51365 (patch)
tree6194df3e747dfc2271fa911aba951ecfe4b78bc5 /indra/llui
parent87f1d6071ee480c5dfcf15f6da3f9a9b9766d723 (diff)
SL-15245 Multiple guide books open, but cannot close them all
Opening and closing single-instance floaters rapidly and multiple times could result in cleaning instance from floaterreg twice, thus removing new isntance instead of current one
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 3680e20f15..8ceb411ede 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -510,7 +510,12 @@ void LLFloater::destroy()
// virtual
LLFloater::~LLFloater()
{
- LLFloaterReg::removeInstance(mInstanceName, mKey);
+ if (!isDead())
+ {
+ // If it's dead, instance is supposed to be already removed, and
+ // in case of single instance we can remove new one by accident
+ LLFloaterReg::removeInstance(mInstanceName, mKey);
+ }
if( gFocusMgr.childHasKeyboardFocus(this))
{