[Modify] Add a null check
This commit is contained in:
parent
843c789b8a
commit
d6a98c3f63
@ -40,6 +40,9 @@ namespace Example3
|
|||||||
|
|
||||||
protected override void OnClose (CloseEventArgs e)
|
protected override void OnClose (CloseEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (_name == null)
|
||||||
|
return;
|
||||||
|
|
||||||
var fmt = "{0} got logged off...";
|
var fmt = "{0} got logged off...";
|
||||||
var msg = String.Format (fmt, _name);
|
var msg = String.Format (fmt, _name);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user