diff --git a/Example2/Chat.cs b/Example2/Chat.cs index 940830b6..2391bf31 100644 --- a/Example2/Chat.cs +++ b/Example2/Chat.cs @@ -40,6 +40,9 @@ namespace Example2 protected override void OnClose (CloseEventArgs e) { + if (_name == null) + return; + var fmt = "{0} got logged off..."; var msg = String.Format (fmt, _name);