diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-09-29 19:33:03 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-09-29 19:33:03 +0100 |
commit | 4dfb0b7b2d76cf288cca34c23218c4769ec76991 (patch) | |
tree | cdd7992b4c3cb3bf35113fd80afada67a54ce581 /indra/newview/llviewermessage.cpp | |
parent | 2669b54e2c25ca705c4a41a89d46dee7a199757e (diff) |
finally, properly(?) deal with submitting empty text.
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-rw-r--r-- | indra/newview/llviewermessage.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3a8f76aca1..e284d8d154 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6180,9 +6180,12 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response) std::string rtn_text; S32 button_idx; button_idx = LLNotification::getSelectedOption(notification, response); - if (response[TEXTBOX_MAGIC_TOKEN].isString()) + if (response[TEXTBOX_MAGIC_TOKEN].isDefined()) { - rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString(); + if (response[TEXTBOX_MAGIC_TOKEN].isString()) + rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString(); + else + rtn_text.clear(); // bool marks empty string } else { |