From 9e6f01321e16db768e4ad9e51c72679ab679975a Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 3 Nov 2009 10:24:02 -0800 Subject: Fixed a couple of NREs in corner cases. --- .../Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs index 40ac647..9c04755 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Grid/HGGridConnector.cs @@ -604,6 +604,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid { CachedUserInfo uinfo = m_aScene.CommsManager.UserProfileCacheService.GetUserDetails(agentData.AgentID); + if (uinfo == null) + return false; + if ((IsLocalUser(uinfo) && (GetHyperlinkRegion(regInfo.RegionHandle) != null)) || (!IsLocalUser(uinfo) && !IsGoingHome(uinfo, regInfo))) { @@ -737,6 +740,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Grid // Is the user going back to the home region or the home grid? protected bool IsGoingHome(CachedUserInfo uinfo, GridRegion rinfo) { + if (uinfo == null) + return false; + if (uinfo.UserProfile == null) return false; -- cgit v1.1