summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermessage.cpp')
-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 b0e36d756d..03c113ecb3 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -1495,7 +1495,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:
@@ -1518,7 +1517,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)
{
@@ -1564,7 +1563,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)
@@ -1581,7 +1583,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:
{
@@ -1618,8 +1623,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;
}
@@ -1641,8 +1649,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;
}