wpf: Add a TerminalControlSize emptiness check (#8906)

Watson reports show that an "ArgumentException" is being thrown due to `renderSize`
not being valid. Added a check for renderSize before attempting to resize.
This commit is contained in:
Javier 2021-01-26 15:57:30 -06:00 committed by GitHub
parent ae8347f336
commit 96e0232603
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,7 +138,7 @@ namespace Microsoft.Terminal.Wpf
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);
}