Skip to content

Commit

Permalink
Prevent potential null pointer crash in export buffer action (#12180)
Browse files Browse the repository at this point in the history
## Summary of the Pull Request
Prevents a potential null pointer crash in the export buffer action.

## PR Checklist
* [x] Closes #12170
* [x] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Documentation updated. If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/terminal) and link it here: #xxx
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

## Validation Steps Performed
Manually tested.
  • Loading branch information
ianjoneill authored Jan 18, 2022
1 parent 7061c54 commit 084bf89
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/cascadia/TerminalApp/AppActionHandlers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -923,7 +923,10 @@ namespace winrt::TerminalApp::implementation

// If we didn't have args, or the args weren't ExportBufferArgs (somehow)
_ExportTab(*activeTab, L"");
args.Handled(true);
if (args)
{
args.Handled(true);
}
}
}

Expand Down

0 comments on commit 084bf89

Please sign in to comment.