summaryrefslogtreecommitdiff
path: root/indra/llui/llfloaterreg.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2024-05-07 09:47:37 -0500
committerGitHub <noreply@github.com>2024-05-07 09:47:37 -0500
commit155ddf23363f1d5c534c69f50505faf67e51948f (patch)
tree976912ed4fa3bc2af7b0b68201460f08614748b5 /indra/llui/llfloaterreg.cpp
parentf79548ec68ebcef8f8f83705b65fd59da43c3e26 (diff)
parentf9473e8afcb624cc1b101195bf15943ec372b56f (diff)
Merge pull request #1421 from secondlife/DRTVWR-600-maint-A
Drtvwr 600 maint a
Diffstat (limited to 'indra/llui/llfloaterreg.cpp')
-rw-r--r--indra/llui/llfloaterreg.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index d87e4ce70f..1c3efaa9cf 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -281,15 +281,15 @@ bool LLFloaterReg::hideInstance(const std::string& name, const LLSD& key)
bool LLFloaterReg::toggleInstance(const std::string& name, const LLSD& key)
{
LLFloater* instance = findInstance(name, key);
- if (LLFloater::isShown(instance))
+ if (instance && instance->isShown())
{
instance->closeHostedFloater();
return false;
}
- else
- {
- return showInstance(name, key, true) ? true : false;
- }
+
+ instance = showInstance(name, key, true);
+
+ return instance != nullptr;
}
//static