summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-03-07 22:37:14 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2025-03-11 11:09:59 +0200
commitd5b72eb78d8958f4cba96dd6cff397063918277b (patch)
treed3e97d957c80653275c38a9c0d5f678a02a990c0
parent5ce0c5858c387346b7b8923ec55b4cee3f1c4d12 (diff)
#3697 Crash on LLAvatarPropertiesProcessor::notifyObservers
-rw-r--r--indra/newview/llfloaterpreference.cpp4
-rw-r--r--indra/newview/llpanelclassified.cpp9
-rw-r--r--indra/newview/llpanelclassified.h2
-rw-r--r--indra/newview/llpanelprofileclassifieds.cpp7
4 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index e673752986..9c3dec6332 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -542,6 +542,10 @@ void LLFloaterPreference::onDoNotDisturbResponseChanged()
LLFloaterPreference::~LLFloaterPreference()
{
LLConversationLog::instance().removeObserver(this);
+ if (LLAvatarPropertiesProcessor::instanceExists())
+ {
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(gAgent.getID(), this);
+ }
mComplexityChangedSignal.disconnect();
}
diff --git a/indra/newview/llpanelclassified.cpp b/indra/newview/llpanelclassified.cpp
index 1faf241aaa..449a670de9 100644
--- a/indra/newview/llpanelclassified.cpp
+++ b/indra/newview/llpanelclassified.cpp
@@ -266,6 +266,15 @@ void LLPanelClassifiedInfo::processProperties(void* data, EAvatarProcessorType t
}
}
+void LLPanelClassifiedInfo::setAvatarId(const LLUUID& avatar_id)
+{
+ if (mAvatarId.notNull())
+ {
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(mAvatarId, this);
+ }
+ mAvatarId = avatar_id;
+}
+
void LLPanelClassifiedInfo::resetData()
{
setClassifiedName(LLStringUtil::null);
diff --git a/indra/newview/llpanelclassified.h b/indra/newview/llpanelclassified.h
index 266b9d222a..a429468a52 100644
--- a/indra/newview/llpanelclassified.h
+++ b/indra/newview/llpanelclassified.h
@@ -53,7 +53,7 @@ public:
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
- void setAvatarId(const LLUUID& avatar_id) { mAvatarId = avatar_id; }
+ void setAvatarId(const LLUUID& avatar_id);
LLUUID& getAvatarId() { return mAvatarId; }
diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp
index 62829b0745..3920dd82c8 100644
--- a/indra/newview/llpanelprofileclassifieds.cpp
+++ b/indra/newview/llpanelprofileclassifieds.cpp
@@ -78,6 +78,13 @@ class LLClassifiedHandler : public LLCommandHandler, public LLAvatarPropertiesOb
public:
// throttle calls from untrusted browsers
LLClassifiedHandler() : LLCommandHandler("classified", UNTRUSTED_THROTTLE) {}
+ virtual ~LLClassifiedHandler()
+ {
+ if (LLAvatarPropertiesProcessor::instanceExists())
+ {
+ LLAvatarPropertiesProcessor::getInstance()->removeObserver(LLUUID(), this);
+ }
+ }
std::set<LLUUID> mClassifiedIds;
std::string mRequestVerb;