From 3040b07cc2113ac9656668835c621ad4f9c7ff34 Mon Sep 17 00:00:00 2001 From: mattias Date: Sat, 21 Jul 2012 20:22:38 +0000 Subject: [PATCH] lcl: check helpmanager and comment how to init help system git-svn-id: trunk@37990 - --- lcl/helpintfs.pas | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lcl/helpintfs.pas b/lcl/helpintfs.pas index dc6853ebd5..ef549c7b9a 100644 --- a/lcl/helpintfs.pas +++ b/lcl/helpintfs.pas @@ -232,6 +232,7 @@ type var HelpManager: THelpManager = nil;// set by the IDE + // LCL applications can call CreateLCLHelpSystem in unit LazHelpIntf //============================================================================== { Showing help (how it works): @@ -348,6 +349,10 @@ end; function ShowHelpForKeyword(HelpDatabaseID: THelpDatabaseID; const HelpKeyword: string; var ErrMsg: string): TShowHelpResult; begin + if HelpManager=nil then begin + ErrMsg:='HelpManager=nil'; + exit(shrHelpNotFound); + end; Result:=HelpManager.ShowHelpForQuery( THelpQueryKeyword.Create(HelpDatabaseID,HelpKeyword), true,ErrMsg);