From d7060eb323f7cfebb7576e2999f782e8617e40e8 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Sat, 13 Feb 2010 14:08:58 +0000 Subject: CID-205 Checker: REVERSE_INULL Function: LLPanel::fromXML(LLPointer, LLView *, LLPointer) File: /indra/llui/llpanel.cpp --- indra/llui/llpanel.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp index 7b406e090a..d963cf4c98 100644 --- a/indra/llui/llpanel.cpp +++ b/indra/llui/llpanel.cpp @@ -397,6 +397,12 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_ if (!panelp) { panelp = LLUICtrlFactory::getInstance()->createFactoryPanel(name); + llassert(panelp); + + if (!panelp) + { + return NULL; // :( + } } } @@ -414,7 +420,7 @@ LLView* LLPanel::fromXML(LLXMLNodePtr node, LLView* parent, LLXMLNodePtr output_ panelp->mCommitCallbackRegistrar.popScope(); panelp->mEnableCallbackRegistrar.popScope(); - if (panelp && !panelp->getFactoryMap().empty()) + if (!panelp->getFactoryMap().empty()) { LLUICtrlFactory::instance().popFactoryFunctions(); } -- cgit v1.2.3