diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-04-24 08:55:20 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-04-24 08:55:20 -0400 |
commit | 3ae8a821c3b627f3b02df636e7649f28b97d6f57 (patch) | |
tree | 79d5d3f2b262b7f5d60cc6135b80221878aa74b8 /indra/newview/llfloaterpay.cpp | |
parent | 39b17157f9c31a4b911113561d4fc8f86396c430 (diff) | |
parent | fde0868231a25b8c9ce03a86cb53f1738d35688d (diff) |
merge
Diffstat (limited to 'indra/newview/llfloaterpay.cpp')
-rwxr-xr-x | indra/newview/llfloaterpay.cpp | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp index a4d13ce1d5..31245db344 100755 --- a/indra/newview/llfloaterpay.cpp +++ b/indra/newview/llfloaterpay.cpp @@ -119,7 +119,6 @@ protected: }; -const S32 MAX_AMOUNT_LENGTH = 10; const S32 FASTPAY_BUTTON_WIDTH = 80; const S32 PAY_AMOUNT_NOTIFICATION = 200; @@ -368,7 +367,8 @@ void LLFloaterPay::payViaObject(money_callback callback, LLSafeHandle<LLObjectSe LLSelectNode* node = selection->getFirstRootNode(); if (!node) { - //FIXME: notify user object no longer exists + // object no longer exists + LLNotificationsUtil::add("PayObjectFailed"); floater->closeFloater(); return; } @@ -492,12 +492,22 @@ void LLFloaterPay::onGive(void* data) } if (amount > PAY_AMOUNT_NOTIFICATION && gStatusBar && gStatusBar->getBalance() > amount) { - LLUUID payee_id; - BOOL is_group; + LLUUID payee_id = LLUUID::null; + BOOL is_group = false; if (floater->mObjectSelection.notNull()) { LLSelectNode* node = floater->mObjectSelection->getFirstRootNode(); - node->mPermissions->getOwnership(payee_id, is_group); + if (node) + { + node->mPermissions->getOwnership(payee_id, is_group); + } + else + { + // object no longer exists + LLNotificationsUtil::add("PayObjectFailed"); + floater->closeFloater(); + return; + } } else { @@ -563,6 +573,10 @@ void LLFloaterPay::give(S32 amount) msg->sendReliable( region->getHost() ); } } + else + { + LLNotificationsUtil::add("PayObjectFailed"); + } } else { |