summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-07-03 18:11:14 -0700
committerMerov Linden <merov@lindenlab.com>2012-07-03 18:11:14 -0700
commit52bf9e20454181d8acb0ac419a882cc1a0e3af9e (patch)
tree9c32a03a33156067d5ec794d5f4c1c1d8a833f92 /indra
parentf22e5df8b6890aab659916361d42479ca3825be9 (diff)
CHUI-174 : Fixed crash in forced response to notifications. Use an empty form in that case and allow the notification to not be in the notifications list.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llviewermessage.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index dd78bbd491..7e1f186769 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1481,7 +1481,6 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
}
LLNotificationPtr notification_ptr = LLNotifications::instance().find(notification["id"].asUUID());
- llassert(notification_ptr != NULL);
// For muting, we need to add the mute, then decline the offer.
// This must be done here because:
@@ -1504,7 +1503,7 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
bool busy = gAgent.getBusy();
- LLNotificationFormPtr modified_form(new LLNotificationForm(*notification_ptr->getForm()));
+ LLNotificationFormPtr modified_form(notification_ptr ? new LLNotificationForm(*notification_ptr->getForm()) : new LLNotificationForm());
switch(button)
{
@@ -1550,7 +1549,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
break;
}
- modified_form->setElementEnabled("Show", false);
+ if (modified_form != NULL)
+ {
+ modified_form->setElementEnabled("Show", false);
+ }
break;
// end switch (mIM)
@@ -1567,7 +1569,10 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
break;
case IOR_MUTE:
- modified_form->setElementEnabled("Mute", false);
+ if (modified_form != NULL)
+ {
+ modified_form->setElementEnabled("Mute", false);
+ }
// MUTE falls through to decline
case IOR_DECLINE:
{
@@ -1604,8 +1609,11 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
busy_message(gMessageSystem, mFromID);
}
- modified_form->setElementEnabled("Show", false);
- modified_form->setElementEnabled("Discard", false);
+ if (modified_form != NULL)
+ {
+ modified_form->setElementEnabled("Show", false);
+ modified_form->setElementEnabled("Discard", false);
+ }
break;
}
@@ -1627,8 +1635,11 @@ bool LLOfferInfo::inventory_offer_callback(const LLSD& notification, const LLSD&
delete this;
}
- notification_ptr->updateForm(modified_form);
- notification_ptr->repost();
+ if (notification_ptr != NULL)
+ {
+ notification_ptr->updateForm(modified_form);
+ notification_ptr->repost();
+ }
return false;
}