Skip to content

Commit

Permalink
Don't explode when duplicating a pane (#17110)
Browse files Browse the repository at this point in the history
I forgot to check here if the `INewContentArgs` were null or not. Pretty
dumb mistake honestly.

Closes #17075
Closes #17076
  • Loading branch information
zadjii-msft authored Apr 23, 2024
1 parent daffb2d commit 87a9f72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cascadia/TerminalApp/TerminalPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3152,7 +3152,8 @@ namespace winrt::TerminalApp::implementation
TerminalConnection::ITerminalConnection existingConnection)

{
if (const auto& newTerminalArgs{ contentArgs.try_as<NewTerminalArgs>() })
const auto& newTerminalArgs{ contentArgs.try_as<NewTerminalArgs>() };
if (contentArgs == nullptr || newTerminalArgs != nullptr || contentArgs.Type().empty())
{
// Terminals are of course special, and have to deal with debug taps, duplicating the tab, etc.
return _MakeTerminalPane(newTerminalArgs, sourceTab, existingConnection);
Expand Down

0 comments on commit 87a9f72

Please sign in to comment.