[PR #10148] Fix crash on saving the settings twice #27932

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

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

State: closed
Merged: Yes


Summary of the Pull Request

Check for null before serializing the default terminal. Because the _currentDefaultTerminal is only initialized when the Launch page is navigated to, this could be null if you navigate to another page, save, then save again.

PR Checklist

Validation Steps Performed

It crashed consistently before, it doesn't now.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/10148 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Check for null before serializing the default terminal. Because the _currentDefaultTerminal is only initialized when the `Launch` page is navigated to, this _could_ be null if you navigate to another page, save, then save again. ## PR Checklist * [x] Closes #10003 * [x] I work here * [n/a] Tests added/passed * [n/a] Requires documentation to be updated ## Validation Steps Performed It crashed consistently before, it doesn't now.
claunia added the pull-request label 2026-01-31 09:25:12 +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#27932