Skip to content

Commit

Permalink
Manually close the ContentDialog in teardown (#15387)
Browse files Browse the repository at this point in the history
As discussed. Closes #15364.

Prevents one crash on Windows 10. Opens the door to may more horrors.

Co-authored-by: James Holderness <j4_james@hotmail.com>
  • Loading branch information
zadjii-msft and j4james authored May 22, 2023
1 parent 0ee2c74 commit 910c61b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cascadia/WindowsTerminal/AppHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,12 @@ void AppHost::Close()
_revokers = {};
_showHideWindowThrottler.reset();
_window->Close();

if (_windowLogic)
{
_windowLogic.DismissDialog();
_windowLogic = nullptr;
}
}

// Method Description:
Expand Down

0 comments on commit 910c61b

Please sign in to comment.