diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2012-06-29 12:45:29 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2012-06-29 12:45:29 +0100 |
commit | f4ad74699ac99252ae074d5bdeb8480617842692 (patch) | |
tree | 195387e44e7d27dee39bfbd4376e010c58c73371 /src/corelib | |
parent | 03d4a1507747cd6364d1c418947e5f89b687d817 (diff) | |
download | fpGUI-f4ad74699ac99252ae074d5bdeb8480617842692.tar.xz |
More sanity checks before calling the help viewer.
Instead of just going with the assumption that the docview executable exists,
check for it first, before we go any further. Calling TProcess.Execute with
a non-existing executable gives an unwanted error in our applications.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpg_base.pas | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas index 5d8b66f5..0da8cce8 100644 --- a/src/corelib/fpg_base.pas +++ b/src/corelib/fpg_base.pas @@ -2543,6 +2543,8 @@ var p: TProcess; begin Result := False; + if not fpgFileExists(GetHelpViewer) then + raise EfpGUIUserFeedbackException.Create(rsfailedtofindhelpviewer); p := TProcess.Create(nil); try if fpgFileExists(HelpFile) then @@ -2567,6 +2569,8 @@ var p: TProcess; begin Result := False; + if not fpgFileExists(GetHelpViewer) then + raise EfpGUIUserFeedbackException.Create(rsfailedtofindhelpviewer); p := TProcess.Create(nil); try if fpgFileExists(HelpFile) then |