[PR #17333] Fix a crash when closing panes #31192

Closed
opened 2026-01-31 09:45:42 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


Calling Close() from within WalkPanes is not safe. Simply using _FindPane is enough to fix this.

This PR also fixes another potential source of infinite recursion, and fixes panes being passed by-value into the callbacks.

Closes #17305

Validation Steps Performed

  • Split panes vertically 3 times
  • exit the middle, the bottom and final one, in that order
  • Doesn't crash
**Original Pull Request:** https://github.com/microsoft/terminal/pull/17333 **State:** closed **Merged:** Yes --- Calling Close() from within WalkPanes is not safe. Simply using _FindPane is enough to fix this. This PR also fixes another potential source of infinite recursion, and fixes panes being passed by-value into the callbacks. Closes #17305 ## Validation Steps Performed * Split panes vertically 3 times * `exit` the middle, the bottom and final one, in that order * Doesn't crash ✅
claunia added the pull-request label 2026-01-31 09:45:42 +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#31192