diff --git a/GoToWindow/Squirrel/SquirrelUpdater.cs b/GoToWindow/Squirrel/SquirrelUpdater.cs index ada394a..3352202 100644 --- a/GoToWindow/Squirrel/SquirrelUpdater.cs +++ b/GoToWindow/Squirrel/SquirrelUpdater.cs @@ -79,7 +79,7 @@ static SquirrelUpdater() Enabled = executablePath.StartsWith(appDataPath, StringComparison.InvariantCultureIgnoreCase); if (!Enabled) - Log.Info($"Updates are disabled because GoToWindow is not running from the AppData directory. Executable: {executablePath}, App Data: {appDataPath}"); + Log.Info(String.Format("Updates are disabled because GoToWindow is not running from the AppData directory. Executable: {0}, App Data: {1}", executablePath, appDataPath)); } public SquirrelUpdater(string updateUrl) diff --git a/GoToWindow/ViewModels/MainViewModel.cs b/GoToWindow/ViewModels/MainViewModel.cs index ca5c7de..952f133 100644 --- a/GoToWindow/ViewModels/MainViewModel.cs +++ b/GoToWindow/ViewModels/MainViewModel.cs @@ -148,9 +148,15 @@ public void AskClose() private ISearchResult GetEntryAt(int index) { - var items = Windows?.View?.Cast().ToArray(); + if (Windows == null || Windows.View == null) + return null; - return index < items?.Length ? items[index] : null; + var items = Windows.View.Cast().ToArray(); + + if (index < items.Length) + return items[index]; + + return null; } private void GoToWindowEntryShortcutCommand_Executed(object sender, EventArgs e) diff --git a/GoToWindow/packages.config b/GoToWindow/packages.config index 28db0e4..baab369 100644 --- a/GoToWindow/packages.config +++ b/GoToWindow/packages.config @@ -1,6 +1,6 @@  - +