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/llui | |
parent | c86424c95e9fe3096e15c923ecdacbe12ccc49b3 (diff) |
SOCIAL-659 FIX Viewer crash when selecting report option from mini-inspector in minimal and standard skin
Diffstat (limited to 'indra/llui')
-rw-r--r-- | indra/llui/llnotifications.cpp | 10 |
1 files changed, 7 insertions, 3 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; } |