From 6ecf8f2c01dc90c26a8a0ccbd11abc2241debfa9 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 20 Oct 2021 14:53:55 +0300 Subject: SL-16184 FIXED Frame stall when friend comes online. --- indra/newview/llinventorybridge.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fc8179f3b4..844d544e16 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5714,14 +5714,14 @@ class LLCallingCardObserver : public LLFriendObserver public: LLCallingCardObserver(LLCallingCardBridge* bridge) : mBridgep(bridge) {} virtual ~LLCallingCardObserver() { mBridgep = NULL; } - virtual void changed(U32 mask) - { - mBridgep->refreshFolderViewItem(); - if (mask & LLFriendObserver::ONLINE) - { - mBridgep->checkSearchBySuffixChanges(); - } - } + virtual void changed(U32 mask) + { + if (mask & LLFriendObserver::ONLINE) + { + mBridgep->refreshFolderViewItem(); + mBridgep->checkSearchBySuffixChanges(); + } + } protected: LLCallingCardBridge* mBridgep; }; @@ -5735,14 +5735,15 @@ LLCallingCardBridge::LLCallingCardBridge(LLInventoryPanel* inventory, const LLUUID& uuid ) : LLItemBridge(inventory, root, uuid) { - mObserver = new LLCallingCardObserver(this); - LLAvatarTracker::instance().addObserver(mObserver); + mObserver = new LLCallingCardObserver(this); + LLAvatarTracker::instance().addParticularFriendObserver(getItem()->getCreatorUUID(), mObserver); } LLCallingCardBridge::~LLCallingCardBridge() { - LLAvatarTracker::instance().removeObserver(mObserver); - delete mObserver; + LLAvatarTracker::instance().removeParticularFriendObserver(getItem()->getCreatorUUID(), mObserver); + + delete mObserver; } void LLCallingCardBridge::refreshFolderViewItem() -- cgit v1.2.3 From 8bd71fe6e8a83fe90abf4dfe3d881c2915ce7479 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Wed, 23 Feb 2022 18:38:06 +0200 Subject: SL-16904 FIXED The viewer crashes after trying to empty trash containing calling card --- indra/newview/llinventorybridge.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3609c5e457..c1143c9011 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5762,12 +5762,13 @@ LLCallingCardBridge::LLCallingCardBridge(LLInventoryPanel* inventory, LLItemBridge(inventory, root, uuid) { mObserver = new LLCallingCardObserver(this); - LLAvatarTracker::instance().addParticularFriendObserver(getItem()->getCreatorUUID(), mObserver); + mCreatorUUID = getItem()->getCreatorUUID(); + LLAvatarTracker::instance().addParticularFriendObserver(mCreatorUUID, mObserver); } LLCallingCardBridge::~LLCallingCardBridge() { - LLAvatarTracker::instance().removeParticularFriendObserver(getItem()->getCreatorUUID(), mObserver); + LLAvatarTracker::instance().removeParticularFriendObserver(mCreatorUUID, mObserver); delete mObserver; } -- cgit v1.2.3