mirror of https://gitlab.com/basile.b/dexed.git
better prot against a previous bug
This commit is contained in:
parent
16035ef8b3
commit
614f6bdc21
|
|
@ -417,23 +417,24 @@ var
|
||||||
str: string = '';
|
str: string = '';
|
||||||
begin
|
begin
|
||||||
clearTodoList;
|
clearTodoList;
|
||||||
if not exeInSysPath(ToolExeName) then
|
|
||||||
exit;
|
|
||||||
ctxt := getContext;
|
ctxt := getContext;
|
||||||
if ctxt = tcNone then
|
case ctxt of
|
||||||
|
tcNone: exit;
|
||||||
|
tcProject: if fProj = nil then exit;
|
||||||
|
tcFile: if fProj = nil then exit;
|
||||||
|
end;
|
||||||
|
if not exeInSysPath(ToolExeName) then
|
||||||
exit;
|
exit;
|
||||||
//
|
//
|
||||||
killToolProcess;
|
killToolProcess;
|
||||||
// process parameter
|
|
||||||
fToolProc := TCEProcess.Create(nil);
|
fToolProc := TCEProcess.Create(nil);
|
||||||
fToolProc.Executable := exeFullName(ToolExeName);
|
fToolProc.Executable := exeFullName(ToolExeName);
|
||||||
fToolProc.Options := [poUsePipes];
|
fToolProc.Options := [poUsePipes];
|
||||||
fToolProc.ShowWindow := swoHIDE;
|
fToolProc.ShowWindow := swoHIDE;
|
||||||
fToolProc.CurrentDirectory := Application.ExeName.extractFileDir;
|
fToolProc.CurrentDirectory := Application.ExeName.extractFileDir;
|
||||||
fToolProc.OnTerminate := @toolTerminated;
|
fToolProc.OnTerminate := @toolTerminated;
|
||||||
|
|
||||||
// files passed to the tool argument
|
// files passed to the tool argument
|
||||||
if (ctxt = tcProject) and (fProj <> nil) then
|
if (ctxt = tcProject) then
|
||||||
begin
|
begin
|
||||||
i := 0;
|
i := 0;
|
||||||
j := fProj.sourcesCount-1;
|
j := fProj.sourcesCount-1;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue