Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Src/xWorks/GeneratedHtmlViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,10 @@ private void OnDomKeyPress(object sender, DomKeyEventArgs e)
}
private void FindDialog_FormClosing(object sender, FormClosingEventArgs e)
{
if (m_htmlControl?.Browser?.Window == null)
{
return;
}
using (var executor = new AutoJSContext(m_htmlControl.Browser.Window))
{
// Javascript query to execute in the browser
Expand Down Expand Up @@ -1102,8 +1106,11 @@ private void FindNextInBrowser(object sender, IBasicFindView view)

private void FindInBrowser(bool forward)
{
if (geckoBrowser == null)
if (geckoBrowser?.Window == null)
{
Close();
return;
}
int originalResultIndex = resultIndex;
using (var executor = new AutoJSContext(geckoBrowser.Window))
{
Expand Down
Loading