diff options
author | Richard Linden <none@none> | 2011-03-09 18:20:08 -0800 |
---|---|---|
committer | Richard Linden <none@none> | 2011-03-09 18:20:08 -0800 |
commit | 27d25e7ae12e4c88c29cfb8efe887c681e3a6684 (patch) | |
tree | d8adcf7b228d941b40934efc50efe3a3cb0eefe7 /indra | |
parent | c86424c95e9fe3096e15c923ecdacbe12ccc49b3 (diff) |
SOCIAL-659 FIX Viewer crash when selecting report option from mini-inspector in minimal and standard skin
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llnotifications.cpp | 10 | ||||
-rw-r--r-- | indra/newview/lltoast.cpp | 7 |
2 files changed, 11 insertions, 6 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 7708f2311e..3fac0ccb3a 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -1195,16 +1195,18 @@ bool LLNotifications::uniqueFilter(LLNotificationPtr pNotif) bool LLNotifications::uniqueHandler(const LLSD& payload) { + std::string cmd = payload["sigtype"]; + LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID()); if (pNotif && pNotif->hasUniquenessConstraints()) { - if (payload["sigtype"].asString() == "add") + if (cmd == "add") { // not a duplicate according to uniqueness criteria, so we keep it // and store it for future uniqueness checks mUniqueNotifications.insert(std::make_pair(pNotif->getName(), pNotif)); } - else if (payload["sigtype"].asString() == "delete") + else if (cmd == "delete") { mUniqueNotifications.erase(pNotif->getName()); } @@ -1217,7 +1219,9 @@ bool LLNotifications::failedUniquenessTest(const LLSD& payload) { LLNotificationPtr pNotif = LLNotifications::instance().find(payload["id"].asUUID()); - if (!pNotif) + std::string cmd = payload["sigtype"]; + + if (!pNotif || cmd != "add") { return false; } diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index fd5582d6f7..e0b07ed408 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -99,7 +99,6 @@ LLToast::Params::Params() LLToast::LLToast(const LLToast::Params& p) : LLModalDialog(LLSD(), p.is_modal), - mPanel(p.panel), mToastLifetime(p.lifetime_secs), mToastFadingTime(p.fading_time_secs), mNotificationID(p.notif_id), @@ -108,6 +107,7 @@ LLToast::LLToast(const LLToast::Params& p) mCanBeStored(p.can_be_stored), mHideBtnEnabled(p.enable_hide_btn), mHideBtn(NULL), + mPanel(NULL), mNotification(p.notification), mIsHidden(false), mHideBtnPressed(false), @@ -128,9 +128,9 @@ LLToast::LLToast(const LLToast::Params& p) setBackgroundOpaque(TRUE); // *TODO: obsolete updateTransparency(); - if(mPanel) + if(p.panel()) { - insertPanel(mPanel); + insertPanel(p.panel); } if(mHideBtnEnabled) @@ -309,6 +309,7 @@ void LLToast::reshapeToPanel() void LLToast::insertPanel(LLPanel* panel) { + mPanel = panel; mWrapperPanel->addChild(panel); reshapeToPanel(); } |