Skip to content

Commit 8b6065d

Browse files
committed
WinForms - check if MainFrame.IsValid before calling LoadUrl
- Check MainFrame.IsValid As yet I've not seen a way to reproduce the actual problem, single reported case so far at TV-Rename/tvrename#862
1 parent b064efd commit 8b6065d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CefSharp.WinForms/ChromiumWebBrowser.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,10 @@ public void Load(string url)
454454
{
455455
using (var frame = this.GetMainFrame())
456456
{
457-
frame.LoadUrl(url);
457+
if (frame.IsValid)
458+
{
459+
frame.LoadUrl(url);
460+
}
458461
}
459462
}
460463
else

0 commit comments

Comments
 (0)