Skip to content

Commit 19b41c4

Browse files
favicon evalautescriptasync , disposed error fix
1 parent 68ba852 commit 19b41c4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Managers/FavIconManager.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ public static async void LoadFavicon(ChromiumWebBrowser browser, bool readCacheO
115115

116116
//--------------------------------------------------------------
117117
// 5. Search for the link tag on the page for the icon path
118+
if (browser is null || browser.IsDisposed || browser.Disposing) //because its async..
119+
return;
120+
118121
var result = await browser.EvaluateScriptAsync(FavIconJS);
119122
if (result.Success && result.Result is string iconHref && !string.IsNullOrWhiteSpace(iconHref)) {
120123
try {

0 commit comments

Comments
 (0)