Skip to content

Commit

Permalink
fixed #44
Browse files Browse the repository at this point in the history
  • Loading branch information
poma committed May 16, 2016
1 parent a9bf79e commit d0fb510
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion StatsDisplay/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ private void SetupHotkeys()
{
_hotKey = new HotKey(Key.Tab, KeyModifier.Shift | KeyModifier.NoRepeat);
_hotKey.Pressed += (o, e) => {
if (_currentWindow?.IsVisible ?? false) {
if (_currentWindow == null) {
return;
}
if (_currentWindow.IsVisible) {
_currentWindow.Hide();
} else {
_currentWindow.Show();
Expand Down

0 comments on commit d0fb510

Please sign in to comment.