Skip to content

Commit

Permalink
wpf: Add a TerminalControlSize emptiness check (#8906)
Browse files Browse the repository at this point in the history
Watson reports show that an "ArgumentException" is being thrown due to `renderSize`
not being valid. Added a check for renderSize before attempting to resize.
  • Loading branch information
javierdlg authored Jan 26, 2021
1 parent ae8347f commit 96e0232
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cascadia/WpfTerminalControl/TerminalContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ internal void SetTheme(TerminalTheme theme, string fontFamily, short fontSize)

NativeMethods.TerminalSetTheme(this.terminal, theme, fontFamily, fontSize, (int)dpiScale.PixelsPerInchX);

if (!this.RenderSize.IsEmpty)
if (!this.RenderSize.IsEmpty && !this.TerminalControlSize.IsEmpty)
{
this.Resize(this.TerminalControlSize);
}
Expand Down

0 comments on commit 96e0232

Please sign in to comment.