Skip to content

Commit

Permalink
fix: WPF TransitioningContentControl can crash
Browse files Browse the repository at this point in the history
  • Loading branch information
glennawatson committed Dec 8, 2020
1 parent 5082957 commit 21fb256
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ReactiveUI.Wpf/TransitioningContentControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ protected override void OnContentChanged(object oldContent, object newContent)

private static RenderTargetBitmap GetRenderTargetBitmapFromUiElement(UIElement uiElement)
{
if (uiElement.RenderSize.Height == 0)
if (uiElement.RenderSize.Height == 0 || uiElement.RenderSize.Width == 0)
{
return default!;
}
Expand Down

0 comments on commit 21fb256

Please sign in to comment.