[PR #19759] Fix crash when opening Snippets with Settings tab active (SplitPane) #31950

Open
opened 2026-01-31 09:50:34 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/19759

State: closed
Merged: No


Summary of the Pull Request

Fix crash when opening Snippets with Settings tab active (SplitPane)

References and Relevant Issues

#19534

Detailed Description of the Pull Request / Additional comments

TerminalPage.cpp:

void TerminalPage::_SplitPane(const winrt::com_ptr<Tab>& tab,
// ...
// For now, prevent splitting the _settingsTab. We can always revisit this later.
if (*activeTab == _settingsTab)
{
    return;
}

immediately releases tab, coroutine resumes with invalid this

Validation Steps Performed

PR Checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/19759 **State:** closed **Merged:** No --- ## Summary of the Pull Request Fix crash when opening Snippets with Settings tab active (SplitPane) ## References and Relevant Issues #19534 ## Detailed Description of the Pull Request / Additional comments TerminalPage.cpp: ```cpp void TerminalPage::_SplitPane(const winrt::com_ptr<Tab>& tab, // ... // For now, prevent splitting the _settingsTab. We can always revisit this later. if (*activeTab == _settingsTab) { return; } ``` immediately releases `tab`, coroutine resumes with invalid `this` ## Validation Steps Performed ## PR Checklist - [x] Closes #19534 - [ ] Tests added/passed - [ ] Documentation updated - If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx - [ ] Schema updated (if necessary)
claunia added the pull-request label 2026-01-31 09:50:34 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31950