diff --git a/tools/chmmaker/unit1.pas b/tools/chmmaker/unit1.pas index de1351c71d..ee0937109f 100644 --- a/tools/chmmaker/unit1.pas +++ b/tools/chmmaker/unit1.pas @@ -281,9 +281,12 @@ begin Exit; end; LHelpConn := TLHelpConnection.Create; - LHelpConn.StartHelpServer('chmmaker', LHelpName); - LHelpConn.OpenFile(ChmFileNameEdit.FileName); - LHelpConn.Free; + try + LHelpConn.StartHelpServer('chmmaker', LHelpName); + LHelpConn.OpenFile(ChmFileNameEdit.FileName); + finally + LHelpConn.Free; + end; end; procedure TCHMForm.FileListBoxDrawItem(Control: TWinControl; Index: Integer;