diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-10-08 22:39:17 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-10-08 22:39:17 +0000 |
commit | 4c89e7389383e2943334ad8ec185b8935cbe7db8 (patch) | |
tree | 5854b9d843f2b31d70676f82a11aa456cd2dde22 /indra/llui/llfloaterreg.cpp | |
parent | e11ed1f01fd8733adc122a5efe82a9bfc2f78734 (diff) |
Fixed a problem where floaters that failed to load their XML would still be opened. This was particularly a problem with Modal Dialogs since the UI would loose focus with no floater to respond to.
Reviewed by Leyla
Diffstat (limited to 'indra/llui/llfloaterreg.cpp')
-rw-r--r-- | indra/llui/llfloaterreg.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp index a63b1b085c..815260dff3 100644 --- a/indra/llui/llfloaterreg.cpp +++ b/indra/llui/llfloaterreg.cpp @@ -121,8 +121,13 @@ LLFloater* LLFloaterReg::getInstance(const std::string& name, const LLSD& key) res = build_func(key); - LLUICtrlFactory::getInstance()->buildFloater(res, xui_file, NULL); - + bool success = LLUICtrlFactory::getInstance()->buildFloater(res, xui_file, NULL); + if (!success) + { + llwarns << "Failed to buid floater type: '" << name << "'." << llendl; + return NULL; + } + // Note: key should eventually be a non optional LLFloater arg; for now, set mKey to be safe res->mKey = key; res->setInstanceName(name); |