[PR #11082] Fix a crash when there aren't any recentCommands yet #28402

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

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

State: closed
Merged: Yes


The first time you open commandline mode, recentCommands doesn't exist yet. However, we immediately try to read the Size() in a couple places. This'll A/V and we'll crash 😨

The fix is easy - don't try and read the size of the non-existent recentCommands

Found this while playing with #11069
Regressed in #11030
Didn't bother filing an issue for it when I have the fix in hand

**Original Pull Request:** https://github.com/microsoft/terminal/pull/11082 **State:** closed **Merged:** Yes --- The first time you open commandline mode, `recentCommands` doesn't exist yet. However, we immediately try to read the `Size()` in a couple places. This'll A/V and we'll crash 😨 The fix is easy - don't try and read the size of the non-existent `recentCommands` Found this while playing with #11069 Regressed in #11030 Didn't bother filing an issue for it when I have the fix in hand
claunia added the pull-request label 2026-01-31 09:28:17 +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#28402