diff options
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index e5a943b..dbf9276 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -427,6 +427,8 @@ namespace OpenSim.Framework.UserManagement | |||
427 | 427 | ||
428 | if (userProfile != null) | 428 | if (userProfile != null) |
429 | { | 429 | { |
430 | // This line needs to be in side the above if statement or the UserServer will crash on some logouts. | ||
431 | m_log.Info("[LOGOUT]: " + userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")"); | ||
430 | 432 | ||
431 | userAgent = userProfile.currentAgent; | 433 | userAgent = userProfile.currentAgent; |
432 | if (userAgent != null) | 434 | if (userAgent != null) |
@@ -434,7 +436,10 @@ namespace OpenSim.Framework.UserManagement | |||
434 | userAgent.agentOnline = false; | 436 | userAgent.agentOnline = false; |
435 | userAgent.logoutTime = Util.UnixTimeSinceEpoch(); | 437 | userAgent.logoutTime = Util.UnixTimeSinceEpoch(); |
436 | userAgent.sessionID = LLUUID.Zero; | 438 | userAgent.sessionID = LLUUID.Zero; |
437 | userAgent.currentRegion = regionid; | 439 | if (regionid != null) |
440 | { | ||
441 | userAgent.currentRegion = regionid; | ||
442 | } | ||
438 | userAgent.currentHandle = regionhandle; | 443 | userAgent.currentHandle = regionhandle; |
439 | 444 | ||
440 | userAgent.currentPos = currentPos; | 445 | userAgent.currentPos = currentPos; |
@@ -446,9 +451,10 @@ namespace OpenSim.Framework.UserManagement | |||
446 | } | 451 | } |
447 | else | 452 | else |
448 | { | 453 | { |
449 | m_log.Info("[LOGOUT]: didn't save logout position, currentAgent: " + userAgent.ToString() ); | 454 | // If currentagent is null, we can't reference it here or the UserServer crashes! |
455 | m_log.Info("[LOGOUT]: didn't save logout position: " + userid.ToString()); | ||
450 | } | 456 | } |
451 | m_log.Info("[LOGOUT]: " + userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")" ); | 457 | |
452 | } | 458 | } |
453 | else | 459 | else |
454 | { | 460 | { |