summaryrefslogtreecommitdiff
path: root/indra/llui/llradiogroup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llradiogroup.cpp')
-rwxr-xr-xindra/llui/llradiogroup.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llui/llradiogroup.cpp b/indra/llui/llradiogroup.cpp
index b53bb16d97..8cf72928ff 100755
--- a/indra/llui/llradiogroup.cpp
+++ b/indra/llui/llradiogroup.cpp
@@ -179,6 +179,18 @@ BOOL LLRadioGroup::setSelectedIndex(S32 index, BOOL from_event)
return FALSE;
}
+ if (index < -1)
+ {
+ // less then minimum value
+ return FALSE;
+ }
+
+ if (index < 0 && mSelectedIndex >= 0 && !mAllowDeselect)
+ {
+ // -1 is "nothing selected"
+ return FALSE;
+ }
+
if (mSelectedIndex >= 0)
{
LLRadioCtrl* old_radio_item = mRadioButtons[mSelectedIndex];