summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpay.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2015-04-27 11:14:18 -0700
committerMerov Linden <merov@lindenlab.com>2015-04-27 11:14:18 -0700
commit026db0511f4706ffa7c817ca98ca8a2a68ab5098 (patch)
treec45a97098585066d6e6c0af4345725249fd1a5b5 /indra/newview/llfloaterpay.cpp
parentd631f2fd4daed5e3b10fc6dc290aa16f3d0591f0 (diff)
parentfde0868231a25b8c9ce03a86cb53f1738d35688d (diff)
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llfloaterpay.cpp')
-rwxr-xr-xindra/newview/llfloaterpay.cpp23
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llfloaterpay.cpp b/indra/newview/llfloaterpay.cpp
index 172f81d078..31245db344 100755
--- a/indra/newview/llfloaterpay.cpp
+++ b/indra/newview/llfloaterpay.cpp
@@ -367,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;
}
@@ -491,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
{
@@ -562,6 +573,10 @@ void LLFloaterPay::give(S32 amount)
msg->sendReliable( region->getHost() );
}
}
+ else
+ {
+ LLNotificationsUtil::add("PayObjectFailed");
+ }
}
else
{