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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/10148
Author: @zadjii-msft
Created: 5/21/2021
Status: Merged
Merged: 5/21/2021
Merged by: @undefined

Base: mainHead: dev/migrie/b/10003-sui-defterm-crash


📝 Commits (2)

📊 Changes

2 files changed (+21 additions, -6 deletions)

View changed files

📝 src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp (+12 -5)
📝 src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp (+9 -1)

📄 Description

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.


🔄 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/10148 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 5/21/2021 **Status:** ✅ Merged **Merged:** 5/21/2021 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/migrie/b/10003-sui-defterm-crash` --- ### 📝 Commits (2) - [`ed2b112`](https://github.com/microsoft/terminal/commit/ed2b112f4de1f883c4288feab325d738d905e0b8) Fixes #10003 - [`66df3d9`](https://github.com/microsoft/terminal/commit/66df3d957656e566682de873bd575c6f948f7c34) Update src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp ### 📊 Changes **2 files changed** (+21 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettings.cpp` (+12 -5) 📝 `src/cascadia/TerminalSettingsModel/CascadiaSettingsSerialization.cpp` (+9 -1) </details> ### 📄 Description ## 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. --- <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:25:11 +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#27927