Now properly disposing of tray icon on exit.
authorsl
Sat, 24 Jan 2015 11:19:28 +0100
changeset 1027e529cdd3391
parent 101 c7e8e88e1d75
child 103 14f6c8d21ec1
Now properly disposing of tray icon on exit.
Server/MainForm.Designer.cs
     1.1 --- a/Server/MainForm.Designer.cs	Sat Jan 24 09:31:09 2015 +0100
     1.2 +++ b/Server/MainForm.Designer.cs	Sat Jan 24 11:19:28 2015 +0100
     1.3 @@ -13,9 +13,18 @@
     1.4          /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
     1.5          protected override void Dispose(bool disposing)
     1.6          {
     1.7 -            if (disposing && (components != null))
     1.8 +            if (disposing)
     1.9              {
    1.10 -                components.Dispose();
    1.11 +                if (iNotifyIcon != null)
    1.12 +                {
    1.13 +                    iNotifyIcon.Dispose();
    1.14 +                    iNotifyIcon = null;
    1.15 +                }
    1.16 +                
    1.17 +                if (components != null)
    1.18 +                {
    1.19 +                    components.Dispose();
    1.20 +                }
    1.21              }
    1.22              base.Dispose(disposing);
    1.23          }