-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix single-tab window tear-off crash #17251
Fix single-tab window tear-off crash #17251
Conversation
@@ -1051,7 +1051,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation | |||
// MSFT 33353327: We're purposefully not using _initializedTerminal to ensure we're fully initialized. | |||
// Doing so makes us return nullptr when XAML requests an automation peer. | |||
// Instead, we need to give XAML an automation peer, then fix it later. | |||
if (!_IsClosing()) | |||
if (!_IsClosing() && !_detached) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to instead check for !_interactivity
since it's used below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When termcontrol isn't detached or closing we expect _interactivity
to be non-null, no?
Given #10971 has happened in the past, I think THROW_HR_IF_NULL(E_UNEXPECTED, _interactivity)
is better suited.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm OK with this for now
Unlinked #17246 because this doesn't fix all the issues mentioned in that thread. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Validation Steps Performed - Opened multi-tab terminal window with Narrator. Narrator can read characters from the tabs. - Started a drag and drop (tear-off) of a tab, and it didn't crash. This was repeated multiple times. (cherry picked from commit 30ef1f4) Service-Card-Id: 92546868 Service-Version: 1.20
## Validation Steps Performed - Opened multi-tab terminal window with Narrator. Narrator can read characters from the tabs. - Started a drag and drop (tear-off) of a tab, and it didn't crash. This was repeated multiple times. (cherry picked from commit 30ef1f4) Service-Card-Id: 92546869 Service-Version: 1.21
Validation Steps Performed