summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermessage.cpp
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2012-07-09 18:02:19 -0700
committerMerov Linden <merov@lindenlab.com>2012-07-09 18:02:19 -0700
commit550c6e369474a68bf43af039cd522165eaac1512 (patch)
treef5e21f7861a1e5599a59acec5ee12fc12d12c4a4 /indra/newview/llviewermessage.cpp
parent1d41ff232870428022006875e98df5be21731c68 (diff)
parent9ab042dd1d003da15dd579f366db04d4aae3ff6b (diff)
Pull from richard/viewer-chui
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;
}