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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13902
Author: @carlos-zamora
Created: 9/1/2022
Status: Merged
Merged: 9/1/2022
Merged by: @undefined

Base: mainHead: dev/cazamor/cs-rejuv/bugfix-crash-on-save


📝 Commits (3)

  • 358e0bd Fix crash on save in rejuv'd Color Schemes page
  • 1cfe96f remove hasCurrentScheme var
  • 655ce58 Dustin lied to me

📊 Changes

1 file changed (+19 additions, -10 deletions)

View changed files

📝 src/cascadia/TerminalSettingsEditor/ColorSchemesPageViewModel.cpp (+19 -10)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/13902 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 9/1/2022 **Status:** ✅ Merged **Merged:** 9/1/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/cazamor/cs-rejuv/bugfix-crash-on-save` --- ### 📝 Commits (3) - [`358e0bd`](https://github.com/microsoft/terminal/commit/358e0bd061aa80f7ff933e7869f94c0c7ffc073d) Fix crash on save in rejuv'd Color Schemes page - [`1cfe96f`](https://github.com/microsoft/terminal/commit/1cfe96ff4a7b28114f16a0fbb922bf1d2218889b) remove hasCurrentScheme var - [`655ce58`](https://github.com/microsoft/terminal/commit/655ce5815b4d994b2fb5bf058dc6ac7034475828) Dustin lied to me ### 📊 Changes **1 file changed** (+19 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsEditor/ColorSchemesPageViewModel.cpp` (+19 -10) </details> ### 📄 Description ## 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:37:04 +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#29817