[PR #3901] Fix a crash when opening a new tab with args #25543

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

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

State: closed
Merged: Yes


Summary of the Pull Request

I accidentally did the wrong check here to see if the value exists. For an IReference, you need to do variable != nullptr. I did variable.Value().

References

Introduced in #3825

PR Checklist

Detailed Description of the Pull Request / Additional comments

This includes a maybe unrelated fix to make TerminalPage's ShortcutActionDispatch a com_ptr. While I was messing with the tests for this, I caught that we're not supposed to direct allocate winrt types like that. Ofc, the TerminalAppLib project doesn't catch this.

Validation Steps Performed

Ran the terminal manually, instead of just running the tests

**Original Pull Request:** https://github.com/microsoft/terminal/pull/3901 **State:** closed **Merged:** Yes --- ## Summary of the Pull Request I accidentally did the wrong check here to see if the value exists. For an `IReference`, you need to do `variable != nullptr`. I did `variable.Value()`. ## References Introduced in #3825 ## PR Checklist * [x] Closes #3897 * [x] I work here * [ ] Tests added/passed - wow this was a lot harder than I expected * [n/a] Requires documentation to be updated ## Detailed Description of the Pull Request / Additional comments This includes a maybe unrelated fix to make `TerminalPage`'s `ShortcutActionDispatch` a `com_ptr`. While I was messing with the tests for this, I caught that we're not supposed to direct allocate winrt types like that. Ofc, the `TerminalAppLib` project doesn't catch this. ## Validation Steps Performed Ran the terminal manually, instead of just running the tests
claunia added the pull-request label 2026-01-31 09:10:13 +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#25543