Skip to content

Commit

Permalink
Merge pull request #45 from AKruimink/fix-disposed-application-exception
Browse files Browse the repository at this point in the history
Fixes Null Reference exception on application close
  • Loading branch information
AKruimink authored Sep 6, 2024
2 parents a7b37f5 + 3671fc3 commit 5d5bb52
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void RefreshActiveWindows()
Task.Run(() =>
{
var result = _windowService.GetActiveWindows().ToList();
Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => ActiveWindows.UpdateCollection(result)));
Application.Current?.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => ActiveWindows.UpdateCollection(result)));
});
}

Expand Down

0 comments on commit 5d5bb52

Please sign in to comment.