[PR #13902] Fix crash on save in rejuv'd Color Schemes page #29822

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

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

State: closed
Merged: Yes


Summary of the Pull Request

Fix a bug where if you pressed the "Save" button, WT would crash. This was caused by adding the possibility that no color scheme is selected in the main page. With no "current scheme", attempting to get its "name" would cause a null ptr exception.

The fix is simple: just check if we actually have a current scheme.
Bonus points: if we don't have a current scheme, don't bother looking throught the color schemes for a match because we'll never find one.

References

#13269 - Color Schemes Rejuv

**Original Pull Request:** https://github.com/microsoft/terminal/pull/13902 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request Fix a bug where if you pressed the "Save" button, WT would crash. This was caused by adding the possibility that no color scheme is selected in the main page. With no "current scheme", attempting to get its "name" would cause a null ptr exception. The fix is simple: just check if we actually have a current scheme. Bonus points: if we don't have a current scheme, don't bother looking throught the color schemes for a match because we'll never find one. ## References #13269 - Color Schemes Rejuv * [x] closes #13900
claunia added the pull-request label 2026-01-31 09:37: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#29822