OSDN Git Service

Handle the case that during reconnection IsLoggedOn == true and CurrentSim == null.
authorDouglas R. Miles <logicmoo@gmail.com>
Sun, 12 Feb 2012 23:31:06 +0000 (23:31 +0000)
committerDouglas R. Miles <logicmoo@gmail.com>
Sun, 12 Feb 2012 23:31:06 +0000 (23:31 +0000)
git-svn-id: https://radegast.googlecode.com/svn/trunk@1198 f7a694da-4d33-11de-9ad6-1127a62b9fcd

Radegast/GUI/Dialogs/MainForm.cs

index d9a816f..8db827f 100644 (file)
@@ -469,8 +469,9 @@ namespace Radegast
                 tlblMoneyBalance.Text = client.Self.Balance.ToString();
                 icoHealth.Text = client.Self.Health.ToString() + "%";
 
+                var cs = client.Network.CurrentSim;
                 tlblRegionInfo.Text =
-                    client.Network.CurrentSim.Name +
+                    (cs == null ? "No region" : cs.Name) +
                     " (" + Math.Floor(client.Self.SimPosition.X).ToString() + ", " +
                     Math.Floor(client.Self.SimPosition.Y).ToString() + ", " +
                     Math.Floor(client.Self.SimPosition.Z).ToString() + ")";