From 4c89e7389383e2943334ad8ec185b8935cbe7db8 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Thu, 8 Oct 2009 22:39:17 +0000 Subject: 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 --- indra/llui/llfloaterreg.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/llui/llfloaterreg.cpp') 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); -- cgit v1.2.3