From 596366324a27924b8e5af1507da7ec46625dcce2 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Fri, 10 Oct 2008 14:46:01 +0000 Subject: [PATCH] * Added NullReference check to EventQueueGetModule. --- .../Modules/Framework/EventQueueGetModule.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs index 5f20dc1b7b..d0e78f1641 100644 --- a/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs +++ b/OpenSim/Region/Environment/Modules/Framework/EventQueueGetModule.cs @@ -149,8 +149,14 @@ namespace OpenSim.Region.Environment.Modules.Framework public bool Enqueue(LLSD ev, UUID avatarID) { m_log.DebugFormat("[EVENTQUEUE]: Enqueuing event for {0} in region {1}", avatarID, m_scene.RegionInfo.RegionName); - BlockingLLSDQueue queue = GetQueue(avatarID); - queue.Enqueue(ev); + try + { + BlockingLLSDQueue queue = GetQueue(avatarID); + queue.Enqueue(ev); + } catch(NullReferenceException) + { + return false; + } return true; } #endregion