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,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)
{