Skip to content
Snippets Groups Projects
Commit 843036a7 authored by brad kittenbrink's avatar brad kittenbrink
Browse files

Fix for lllogin_tests crash on shutdown.

RegisterFlush destructor was dereferencing a dangling reference to the mainloop EventPump which had already been destructed.
parent a8d216e1
No related branches found
No related tags found
No related merge requests found
......@@ -59,14 +59,12 @@ const char* queue_names[] =
/*****************************************************************************
* If there's a "mainloop" pump, listen on that to flush all LLEventQueues
*****************************************************************************/
struct RegisterFlush
struct RegisterFlush : public LLEventTrackable
{
RegisterFlush():
pumps(LLEventPumps::instance()),
mainloop(pumps.obtain("mainloop")),
name("flushLLEventQueues")
pumps(LLEventPumps::instance())
{
mainloop.listen(name, boost::bind(&RegisterFlush::flush, this, _1));
pumps.obtain("mainloop").listen("flushLLEventQueues", boost::bind(&RegisterFlush::flush, this, _1));
}
bool flush(const LLSD&)
{
......@@ -75,11 +73,9 @@ struct RegisterFlush
}
~RegisterFlush()
{
mainloop.stopListening(name);
// LLEventTrackable handles stopListening for us.
}
LLEventPumps& pumps;
LLEventPump& mainloop;
const std::string name;
};
static RegisterFlush registerFlush;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment