Theoretical fix for some crashes (#15457)
RE: * #15454 * MSFT:44725712 "WindowsTerminal.exe!NonClientIslandWindow::OnSize" * MSFT:44754014 "NonClientIslandWindow::GetTotalNonClientExclusiveSize" I think this should fix all of those, but I want to ship and verify live, since I can't repro this locally.
This commit is contained in:
parent
a19d30a25a
commit
8611d901b6
|
@ -82,6 +82,16 @@ void IslandWindow::Close()
|
|||
// </BODGY>
|
||||
}
|
||||
|
||||
// GH#15454: Unset the user data for the window. This will prevent future
|
||||
// callbacks that come onto our window message loop from being sent to the
|
||||
// IslandWindow (or other derived class's) implementation.
|
||||
//
|
||||
// Specifically, this prevents a pending coroutine from being able to call
|
||||
// something like ShowWindow, and have that come back on the IslandWindow
|
||||
// message loop, where it'll end up asking XAML something that XAML is no
|
||||
// longer able to answer.
|
||||
SetWindowLongPtr(_window.get(), GWLP_USERDATA, 0);
|
||||
|
||||
if (_source)
|
||||
{
|
||||
_source.Close();
|
||||
|
|
Loading…
Reference in New Issue