Skip to content

Commit 21fb256

Browse files
committed
fix: WPF TransitioningContentControl can crash
1 parent 5082957 commit 21fb256

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ReactiveUI.Wpf/TransitioningContentControl.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ protected override void OnContentChanged(object oldContent, object newContent)
221221

222222
private static RenderTargetBitmap GetRenderTargetBitmapFromUiElement(UIElement uiElement)
223223
{
224-
if (uiElement.RenderSize.Height == 0)
224+
if (uiElement.RenderSize.Height == 0 || uiElement.RenderSize.Width == 0)
225225
{
226226
return default!;
227227
}

0 commit comments

Comments
 (0)