[PR #13644] [MERGED] Fix a crash on settings reload #29677

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13644
Author: @lhecker
Created: 8/1/2022
Status: ✅ Merged
Merged: 8/2/2022
Merged by: @undefined

Base: main ← Head: dev/lhecker/13543-defaults-crash


📝 Commits (1)

  • c522cb9 Fix a crash on settings reload

📊 Changes

1 file changed (+9 additions, -9 deletions)

View changed files

📝 src/cascadia/TerminalApp/AppLogic.cpp (+9 -9)

📄 Description

07d58a8 contains a regression where the settings' Themes() property is
accessed without checking whether it's a nullptr. This can happen because
the invalid settings modal is shown with a empty settings model object.

This commit fixes the issue by deferring the update of _settings until
after we ensured that the _settings object is valid (besides warnings).

Closes #13543

Validation Steps Performed

  • Replace any string value with 123
  • Application doesn't crash ✅

🔄 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/13644 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 8/1/2022 **Status:** ✅ Merged **Merged:** 8/2/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/13543-defaults-crash` --- ### 📝 Commits (1) - [`c522cb9`](https://github.com/microsoft/terminal/commit/c522cb9ddcd243696e93a8a2a738e1901874edc8) Fix a crash on settings reload ### 📊 Changes **1 file changed** (+9 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/AppLogic.cpp` (+9 -9) </details> ### 📄 Description 07d58a8 contains a regression where the settings' `Themes()` property is accessed without checking whether it's a `nullptr`. This can happen because the invalid settings modal is shown with a empty settings model object. This commit fixes the issue by deferring the update of `_settings` until after we ensured that the `_settings` object is valid (besides warnings). Closes #13543 ## Validation Steps Performed * Replace any string value with `123` * Application doesn't crash ✅ --- <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:36:16 +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#29677