diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2017-10-11 14:35:49 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2017-10-11 14:35:49 -0400 |
commit | 0c7bc67814dd4fa347401c24ba0e1be78e4b838f (patch) | |
tree | 450fc1ce0aff2f2880c32b3ca85161ca0ceff8a6 /indra/llcommon/llevents.cpp | |
parent | b6d22de58850fc9a5b34eeb5b7930e5845bfc42d (diff) | |
parent | 25be14381e29481413c94edf5436c0af715a1578 (diff) |
Automated merge with ssh://bitbucket.org/lindenlab/viewer-release
Diffstat (limited to 'indra/llcommon/llevents.cpp')
-rw-r--r-- | indra/llcommon/llevents.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index 93db6c0d17..dce97b5411 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -281,7 +281,8 @@ const std::string LLEventPump::ANONYMOUS = std::string(); LLEventPump::LLEventPump(const std::string& name, bool tweak): // Register every new instance with LLEventPumps - mName(LLEventPumps::instance().registerNew(*this, name, tweak)), + mRegistry(LLEventPumps::instance().getHandle()), + mName(mRegistry.get()->registerNew(*this, name, tweak)), mSignal(new LLStandardSignal()), mEnabled(true) {} @@ -292,8 +293,13 @@ LLEventPump::LLEventPump(const std::string& name, bool tweak): LLEventPump::~LLEventPump() { - // Unregister this doomed instance from LLEventPumps - LLEventPumps::instance().unregister(*this); + // Unregister this doomed instance from LLEventPumps -- but only if + // LLEventPumps is still around! + LLEventPumps* registry = mRegistry.get(); + if (registry) + { + registry->unregister(*this); + } } // static data member |