[PR #9028] Fix crash when closing multiple splits from the tab context menu #27398

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

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

State: closed
Merged: Yes


Summary of the Pull Request

Fix for #9021

Turns out that what was happening is that the parent pane's Closed event was being caught by the tab, and parent panes always have nullopt as their id. So now the Pane::Id() call always returns an optional, allowing us to check if it has a value before we access it.

PR Checklist

Validation Steps Performed

No more crash

**Original Pull Request:** https://github.com/microsoft/terminal/pull/9028 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Fix for #9021 Turns out that what was happening is that the _parent_ pane's `Closed` event was being caught by the tab, and parent panes always have `nullopt` as their id. So now the `Pane::Id()` call always returns an optional, allowing us to check if it has a value before we access it. ## PR Checklist * [x] Closes #9021 ## Validation Steps Performed No more crash
claunia added the pull-request label 2026-01-31 09:21:44 +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#27398