summaryrefslogtreecommitdiff
path: root/indra/llcommon/llevents.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2017-03-13 16:41:35 -0400
committerNat Goodspeed <nat@lindenlab.com>2017-03-13 16:41:35 -0400
commitd7f5122ee9e12b5aec14b15517c3a4c0021544ce (patch)
tree78a6f0a74993c707196a015a021b4a8676375659 /indra/llcommon/llevents.cpp
parent66de0c9965ff68bcb8cb60975fcffa45e2c6d74c (diff)
parenta160e084afb336ad88af04c96ceb3f804176c92c (diff)
Automated merge with ssh://bitbucket.org/lindenlab/viewer64
Diffstat (limited to 'indra/llcommon/llevents.cpp')
-rw-r--r--indra/llcommon/llevents.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index 97270e4931..a3856e4fc4 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