From 4343ddeec1a7c415444df1f705a0c130198b8e84 Mon Sep 17 00:00:00 2001 From: Homer Horwitz Date: Sun, 16 Nov 2008 23:53:00 +0000 Subject: Fix NRE on TP-to-home, if the home-region is unavailable. --- OpenSim/Region/Environment/Scenes/Scene.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 0416e3a..c055160 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs @@ -2402,8 +2402,11 @@ namespace OpenSim.Region.Environment.Scenes if (regionInfo == null) { regionInfo = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); - UserProfile.HomeRegionID = regionInfo.RegionID; - CommsManager.UserService.UpdateUserProfile(UserProfile); + if(regionInfo != null) // home region can be away temporarily, too + { + UserProfile.HomeRegionID = regionInfo.RegionID; + CommsManager.UserService.UpdateUserProfile(UserProfile); + } } if (regionInfo == null) { -- cgit v1.1