summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graemeg@gmail.com>2012-06-29 12:45:29 +0100
committerGraeme Geldenhuys <graemeg@gmail.com>2012-06-29 12:45:29 +0100
commitf4ad74699ac99252ae074d5bdeb8480617842692 (patch)
tree195387e44e7d27dee39bfbd4376e010c58c73371
parent03d4a1507747cd6364d1c418947e5f89b687d817 (diff)
downloadfpGUI-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.
-rw-r--r--src/corelib/fpg_base.pas4
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