From dbcb6b4fa5a1838f64db4198aeca1894ec0008a8 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 10 Dec 2010 12:06:43 -0800 Subject: fix crash if posting event during shutdown. --- indra/llcommon/llevents.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llevents.cpp') diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index 84a6620a77..b8a594b9bc 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -475,7 +475,7 @@ void LLEventPump::stopListening(const std::string& name) *****************************************************************************/ bool LLEventStream::post(const LLSD& event) { - if (! mEnabled) + if (! mEnabled || !mSignal) { return false; } -- cgit v1.2.3 From 56a39aa914fe32c1986202dc39a3ad4604943b39 Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Fri, 10 Dec 2010 16:15:18 -0800 Subject: fix possible crash on shutdown in event queue flush. --- indra/llcommon/llevents.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llcommon/llevents.cpp') diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index b8a594b9bc..723cbd68c7 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -515,6 +515,8 @@ bool LLEventQueue::post(const LLSD& event) void LLEventQueue::flush() { + if(!mEnabled || !mSignal) return; + // Consider the case when a given listener on this LLEventQueue posts yet // another event on the same queue. If we loop over mEventQueue directly, // we'll end up processing all those events during the same flush() call -- cgit v1.2.3 From 62b9513353900079602bf29c3b8863697a50e46f Mon Sep 17 00:00:00 2001 From: "Andrew A. de Laix" Date: Mon, 13 Dec 2010 12:37:34 -0800 Subject: permit flush when disabled. --- indra/llcommon/llevents.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llevents.cpp') diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp index 723cbd68c7..97e2bdeb57 100644 --- a/indra/llcommon/llevents.cpp +++ b/indra/llcommon/llevents.cpp @@ -515,7 +515,7 @@ bool LLEventQueue::post(const LLSD& event) void LLEventQueue::flush() { - if(!mEnabled || !mSignal) return; + if(!mSignal) return; // Consider the case when a given listener on this LLEventQueue posts yet // another event on the same queue. If we loop over mEventQueue directly, -- cgit v1.2.3