Skip to content

Commit

Permalink
Add null check for BringWindowToTop2
Browse files Browse the repository at this point in the history
  • Loading branch information
Wenveo committed Dec 24, 2022
1 parent b165b5f commit 6541b1e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/Components/AvalonDock/Controls/DragService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ internal void Abort()

private void BringWindowToTop2(Window window)
{
if (window == null) return;

Win32Helper.SetWindowPos(new WindowInteropHelper(window).Handle,
IntPtr.Zero, 0, 0, 0, 0, Win32Helper.SetWindowPosFlags.IgnoreResize | Win32Helper.SetWindowPosFlags.IgnoreMove | Win32Helper.SetWindowPosFlags.DoNotActivate);
}
Expand Down

0 comments on commit 6541b1e

Please sign in to comment.