From fbb01bd28064cde3e00ddf2a0cc4ce87ddd4cb6e Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 15 Jul 2013 11:37:49 -0700 Subject: Protect against null requests --- .../GridServiceThrottle/GridServiceThrottleModule.cs | 10 ++++++---- .../Framework/UserManagement/UserManagementModule.cs | 18 ++++++++++-------- 2 files changed, 16 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/CoreModules/Framework') diff --git a/OpenSim/Region/CoreModules/Framework/GridServiceThrottle/GridServiceThrottleModule.cs b/OpenSim/Region/CoreModules/Framework/GridServiceThrottle/GridServiceThrottleModule.cs index f1eb1ad..fd4d48a 100644 --- a/OpenSim/Region/CoreModules/Framework/GridServiceThrottle/GridServiceThrottleModule.cs +++ b/OpenSim/Region/CoreModules/Framework/GridServiceThrottle/GridServiceThrottleModule.cs @@ -140,11 +140,13 @@ namespace OpenSim.Region.CoreModules.Framework Watchdog.UpdateThread(); GridRegionRequest request = m_RequestQueue.Dequeue(); - GridRegion r = m_scenes[0].GridService.GetRegionByUUID(UUID.Zero, request.regionID); - - if (r != null && r.RegionHandle != 0) - request.client.SendRegionHandle(request.regionID, r.RegionHandle); + if (request != null) + { + GridRegion r = m_scenes[0].GridService.GetRegionByUUID(UUID.Zero, request.regionID); + if (r != null && r.RegionHandle != 0) + request.client.SendRegionHandle(request.regionID, r.RegionHandle); + } } } } diff --git a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs index a528093..507329e 100644 --- a/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs +++ b/OpenSim/Region/CoreModules/Framework/UserManagement/UserManagementModule.cs @@ -681,17 +681,19 @@ namespace OpenSim.Region.CoreModules.Framework.UserManagement Watchdog.UpdateThread(); NameRequest request = m_RequestQueue.Dequeue(); - string[] names; - bool foundRealName = TryGetUserNames(request.uuid, out names); - - if (names.Length == 2) + if (request != null) { - if (!foundRealName) - m_log.DebugFormat("[USER MANAGEMENT MODULE]: Sending {0} {1} for {2} to {3} since no bound name found", names[0], names[1], request.uuid, request.client.Name); + string[] names; + bool foundRealName = TryGetUserNames(request.uuid, out names); - request.client.SendNameReply(request.uuid, names[0], names[1]); - } + if (names.Length == 2) + { + if (!foundRealName) + m_log.DebugFormat("[USER MANAGEMENT MODULE]: Sending {0} {1} for {2} to {3} since no bound name found", names[0], names[1], request.uuid, request.client.Name); + request.client.SendNameReply(request.uuid, names[0], names[1]); + } + } } } -- cgit v1.1