From fe43043e00466dec93cfa2099fe7561ef607359c Mon Sep 17 00:00:00 2001 From: John Maxwell Date: Wed, 13 May 2026 08:59:51 -0700 Subject: [PATCH] Fix LT-22520: Crash when closing Find dialog in Grammar Sketch --- Src/xWorks/GeneratedHtmlViewer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Src/xWorks/GeneratedHtmlViewer.cs b/Src/xWorks/GeneratedHtmlViewer.cs index 2fa2324a13..c3c2f0e301 100644 --- a/Src/xWorks/GeneratedHtmlViewer.cs +++ b/Src/xWorks/GeneratedHtmlViewer.cs @@ -228,6 +228,11 @@ private void InitHtmlControl() private void Find_Click(object sender, EventArgs e) { + if (m_sHtmlFileName == InitialDocument) + { + // InitialDocument doesn't have the proper javascript for Find to work. + return; + } findDlg = new FindDialog(m_htmlControl.Browser); findDlg.FormClosing += new FormClosingEventHandler(FindDialog_FormClosing); findDlg.Show(this);