From 56a39aa914fe32c1986202dc39a3ad4604943b39 Mon Sep 17 00:00:00 2001
From: "Andrew A. de Laix" <alain@lindenlab.com>
Date: Fri, 10 Dec 2010 16:15:18 -0800
Subject: [PATCH] fix possible crash on shutdown in event queue flush.

---
 indra/llcommon/llevents.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/indra/llcommon/llevents.cpp b/indra/llcommon/llevents.cpp
index b8a594b9bc5..723cbd68c7f 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
-- 
GitLab