summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-30 12:07:52 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-30 12:07:52 -0500
commit7e2b88a32b0bed07abcf760bd0adf3403ec2ede2 (patch)
treef288d4643b897b503ee4f14284ffa326650061c4 /indra
parentf2da2c00a8c290cfb98adf5f53745a0108865ce9 (diff)
EXT-2867 : Crash after toggling gestures on and off
Observer wasn't being removed when class was deleted. --HG-- branch : avatar-pipeline
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloatergesture.cpp1
-rw-r--r--indra/newview/llinventoryobserver.cpp9
-rw-r--r--indra/newview/llinventoryobserver.h3
3 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llfloatergesture.cpp b/indra/newview/llfloatergesture.cpp
index 0f8e4c10d7..d51a5d2a03 100644
--- a/indra/newview/llfloatergesture.cpp
+++ b/indra/newview/llfloatergesture.cpp
@@ -168,6 +168,7 @@ LLFloaterGesture::~LLFloaterGesture()
LLGestureManager::instance().removeObserver(mObserver);
delete mObserver;
mObserver = NULL;
+ gInventory.removeObserver(this);
}
// virtual
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 06f4b36df3..315fce5575 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -63,6 +63,15 @@
#include "llsdutil.h"
#include <deque>
+LLInventoryObserver::LLInventoryObserver()
+{
+}
+
+// virtual
+LLInventoryObserver::~LLInventoryObserver()
+{
+}
+
void LLInventoryCompletionObserver::changed(U32 mask)
{
// scan through the incomplete items and move or erase them as
diff --git a/indra/newview/llinventoryobserver.h b/indra/newview/llinventoryobserver.h
index 73b25a8ed0..4ee6c48cb1 100644
--- a/indra/newview/llinventoryobserver.h
+++ b/indra/newview/llinventoryobserver.h
@@ -63,7 +63,8 @@ public:
CALLING_CARD = 32, // online, grant status, cancel, etc change
ALL = 0xffffffff
};
- virtual ~LLInventoryObserver() {};
+ LLInventoryObserver();
+ virtual ~LLInventoryObserver();
virtual void changed(U32 mask) = 0;
std::string mMessageName; // used by Agent Inventory Service only. [DEV-20328]
};