summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-04-14 21:21:29 +0300
committerandreykproductengine <akleshchev@productengine.com>2015-04-14 21:21:29 +0300
commit11ed48abd15d0fcc1e41a9a122a081785d82f917 (patch)
treef861e876a487a071e37a039ddb0157ffc4effc71 /indra/newview
parentd6d13e20f3c1238d4110ebfb8b43814df12e1b61 (diff)
MAINT-5097 FIXED crash in LLFloaterPay::onGive
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloaterpay.cpp23
-rwxr-xr-xindra/newview/skins/default/xui/en/notifications.xml11
2 files changed, 30 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
{
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 632396d58c..28565a85c6 100755
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5277,6 +5277,17 @@ Warning: The &apos;Pay object&apos; click action has been set, but it will only
<notification
icon="alertmodal.tga"
+ name="PayObjectFailed"
+ type="alertmodal">
+ Payment failed: object was not found.
+ <tag>fail</tag>
+ <usetemplate
+ name="okbutton"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
name="OpenObjectCannotCopy"
type="alertmodal">
There are no items in this object that you are allowed to copy.