diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-13 15:05:44 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-02-13 15:05:44 +0000 |
commit | 1bb68d936de2657c3bce3bbe64947f043b5f7333 (patch) | |
tree | 1c2feca2edc4a64e23e6e1c13bfb16962af865af /indra/llui | |
parent | 2aab1d33e125502913075d38d126936d7c2a4a2e (diff) | |
parent | 9fee359d1baf6e0046655cb8e4afabb8774754b1 (diff) |
viewer2 trunk merge.
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llmultisliderctrl.cpp | 7 | ||||
-rw-r--r-- | indra/llui/llpanel.cpp | 8 | ||||
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 4 |
3 files changed, 15 insertions, 4 deletions
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp index 50942e55ca..cc26c00a3e 100644 --- a/indra/llui/llmultisliderctrl.cpp +++ b/indra/llui/llmultisliderctrl.cpp @@ -330,13 +330,14 @@ void LLMultiSliderCtrl::updateText() // static void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata) { + llassert(ctrl); + if (!ctrl) + return; + LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl->getParent()); llassert(self); if (!self) // cast failed - wrong type! :O return; - - if (!ctrl) - return; BOOL success = FALSE; F32 val = self->mCurValue; 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(); } diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 575b6e3b6c..ffaf84cb9b 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -891,6 +891,10 @@ void LLTabContainer::update_images(LLTabTuple* tuple, TabParams params, LLTabCon void LLTabContainer::addTabPanel(const TabPanelParams& panel) { LLPanel* child = panel.panel(); + + llassert(child); + if (!child) return; + const std::string& label = panel.label.isProvided() ? panel.label() : panel.panel()->getLabel(); |