Fix NRE on TP-to-home, if the home-region is unavailable.

0.6.1-post-fixes
Homer Horwitz 2008-11-16 23:53:00 +00:00
parent 07afe9c137
commit 4343ddeec1
1 changed files with 5 additions and 2 deletions

View File

@ -2402,9 +2402,12 @@ namespace OpenSim.Region.Environment.Scenes
if (regionInfo == null) if (regionInfo == null)
{ {
regionInfo = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion); regionInfo = CommsManager.GridService.RequestNeighbourInfo(UserProfile.HomeRegion);
if(regionInfo != null) // home region can be away temporarily, too
{
UserProfile.HomeRegionID = regionInfo.RegionID; UserProfile.HomeRegionID = regionInfo.RegionID;
CommsManager.UserService.UpdateUserProfile(UserProfile); CommsManager.UserService.UpdateUserProfile(UserProfile);
} }
}
if (regionInfo == null) if (regionInfo == null)
{ {
// can't find the Home region: Tell viewer and abort // can't find the Home region: Tell viewer and abort