summaryrefslogtreecommitdiff
path: root/indra/llui/llmultisliderctrl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llmultisliderctrl.cpp')
-rw-r--r--indra/llui/llmultisliderctrl.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index cb81c39103..cc26c00a3e 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -330,9 +330,14 @@ void LLMultiSliderCtrl::updateText()
// static
void LLMultiSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata)
{
- LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl->getParent());
+ llassert(ctrl);
if (!ctrl)
return;
+
+ LLMultiSliderCtrl* self = dynamic_cast<LLMultiSliderCtrl*>(ctrl->getParent());
+ llassert(self);
+ if (!self) // cast failed - wrong type! :O
+ return;
BOOL success = FALSE;
F32 val = self->mCurValue;