Skip to content

Commit 66cb7c4

Browse files
authored
If we failed to get a default profile, fail the settings load (#1343)
This stops the crash in #1318.
1 parent 2015788 commit 66cb7c4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/cascadia/TerminalApp/CascadiaSettingsSerialization.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ std::unique_ptr<CascadiaSettings> CascadiaSettings::LoadAll(const bool saveOnLoa
6565
}
6666
resultPtr = FromJson(root);
6767

68+
if (resultPtr->GlobalSettings().GetDefaultProfile() == GUID{})
69+
{
70+
throw winrt::hresult_invalid_argument();
71+
}
72+
6873
if (saveOnLoad)
6974
{
7075
// Logically compare the json we've parsed from the file to what

0 commit comments

Comments
 (0)