fix, crash on exit, av in todolist widget

This commit is contained in:
Basile Burg 2016-07-06 03:33:31 +02:00
parent 7e7d50c703
commit 4e6dacf81e
1 changed files with 12 additions and 9 deletions

View File

@ -433,16 +433,19 @@ begin
fToolProc.OnTerminate := @toolTerminated; fToolProc.OnTerminate := @toolTerminated;
// files passed to the tool argument // files passed to the tool argument
i := 0; if (ctxt = tcProject) and (fProj <> nil) then
j := fProj.sourcesCount-1;
if ctxt = tcProject then for i := 0 to j do
begin begin
nme := fProj.sourceAbsolute(i); i := 0;
if not hasDlangSyntax(nme.extractFileExt) then j := fProj.sourcesCount-1;
continue; for i := 0 to j do
str += nme; begin
if i <> j then nme := fProj.sourceAbsolute(i);
str += PathSeparator; if not hasDlangSyntax(nme.extractFileExt) then
continue;
str += nme;
if i <> j then
str += PathSeparator;
end;
end end
else str := fDoc.fileName; else str := fDoc.fileName;
fToolProc.Parameters.Add(str); fToolProc.Parameters.Add(str);