summaryrefslogtreecommitdiff
path: root/indra/llui/llfloaterreg.cpp
diff options
context:
space:
mode:
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