Skip to content

Commit 58e7052

Browse files
marinkobabicamaitland
authored andcommitted
check if the visual is connected (#2321)
1 parent 190c3af commit 58e7052

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CefSharp.Wpf/ChromiumWebBrowser.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1622,7 +1622,7 @@ private void WindowStateChanged(object sender, EventArgs e)
16221622

16231623
private void UpdateBrowserScreenLocation()
16241624
{
1625-
if (source != null)
1625+
if (source != null && PresentationSource.FromVisual(this) != null)
16261626
{
16271627
browserScreenLocation = PointToScreen(new Point());
16281628
}

0 commit comments

Comments
 (0)