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,9 +433,11 @@ begin
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
begin
i := 0; i := 0;
j := fProj.sourcesCount-1; j := fProj.sourcesCount-1;
if ctxt = tcProject then for i := 0 to j do for i := 0 to j do
begin begin
nme := fProj.sourceAbsolute(i); nme := fProj.sourceAbsolute(i);
if not hasDlangSyntax(nme.extractFileExt) then if not hasDlangSyntax(nme.extractFileExt) then
@ -443,6 +445,7 @@ begin
str += nme; str += nme;
if i <> j then if i <> j then
str += PathSeparator; str += PathSeparator;
end;
end end
else str := fDoc.fileName; else str := fDoc.fileName;
fToolProc.Parameters.Add(str); fToolProc.Parameters.Add(str);