[PR #11635] Check that the control exists before we try to focus it #28682

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

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

State: closed
Merged: Yes


Summary of the Pull Request

When we are on a settings UI tab, _GetActiveControl returns a nullptr, make sure not to try and focus it in that case

PR Checklist

Validation Steps Performed

No longer crashes

**Original Pull Request:** https://github.com/microsoft/terminal/pull/11635 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request When we are on a settings UI tab, `_GetActiveControl` returns a `nullptr`, make sure not to try and focus it in that case ## PR Checklist * [x] Closes #11633 * [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] 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. * [x] I work here ## Validation Steps Performed No longer crashes
claunia added the pull-request label 2026-01-31 09:30:05 +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#28682