Permalink
Browse files

mac: Fix NullReferenceException on start

  • Loading branch information...
1 parent cac518c commit 2faaba3cf7ef70f4c973d801fd3b81027a3b6063 @hbons committed Jan 22, 2012
Showing with 8 additions and 2 deletions.
  1. +6 −2 SparkleShare/Mac/SparkleSetupWindow.cs
  2. +2 −0 SparkleShare/Mac/SparkleUI.cs
@@ -87,7 +87,9 @@ public SparkleSetupWindow () : base ()
MakeKeyAndOrderFront (this);
OrderFrontRegardless ();
- Program.UI.UpdateDockIconVisibility ();
+
+ if (Program.UI != null)
+ Program.UI.UpdateDockIconVisibility ();
}
@@ -146,7 +148,9 @@ public override void PerformClose (NSObject sender)
{
base.OrderOut (this);
NSApplication.SharedApplication.RemoveWindowsItem (this);
- Program.UI.UpdateDockIconVisibility ();
+
+ if (Program.UI != null)
+ Program.UI.UpdateDockIconVisibility ();
return;
}
@@ -69,6 +69,8 @@ public SparkleUI ()
if (Program.Controller.FirstRun) {
Setup = new SparkleSetup ();
Setup.Controller.ShowSetupPage ();
+
+ UpdateDockIconVisibility ();
}
}
}

0 comments on commit 2faaba3

Please sign in to comment.