summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-09-29 19:00:55 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-09-29 19:00:55 +0100
commitca1821048583acedaae7e1dbfe83a0b058faee2c (patch)
treeea9f083858dbfc7962699a39cec22389df1198c3 /indra/newview/llviewermessage.cpp
parentf7f3df3a2c0b7a87828c4a2c777d9a94502f3d4e (diff)
more robustness for empty-but-not-aborted textboxes.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r--indra/newview/llviewermessage.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index 321100e140..3a8f76aca1 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -6179,15 +6179,14 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response)
llwarns << "ok: " << response << llendl;
std::string rtn_text;
S32 button_idx;
- if (response[TEXTBOX_MAGIC_TOKEN].isDefined())
+ button_idx = LLNotification::getSelectedOption(notification, response);
+ if (response[TEXTBOX_MAGIC_TOKEN].isString())
{
rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString();
- button_idx = 0;
}
else
{
rtn_text = LLNotification::getSelectedOptionName(response);
- button_idx = LLNotification::getSelectedOption(notification, response);
}
llwarns << "rtn: " << rtn_text << " btnidx: " << button_idx << llendl;
// Didn't click "Ignore"