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;
// files passed to the tool argument
i := 0;
j := fProj.sourcesCount-1;
if ctxt = tcProject then for i := 0 to j do
if (ctxt = tcProject) and (fProj <> nil) then
begin
nme := fProj.sourceAbsolute(i);
if not hasDlangSyntax(nme.extractFileExt) then
continue;
str += nme;
if i <> j then
str += PathSeparator;
i := 0;
j := fProj.sourcesCount-1;
for i := 0 to j do
begin
nme := fProj.sourceAbsolute(i);
if not hasDlangSyntax(nme.extractFileExt) then
continue;
str += nme;
if i <> j then
str += PathSeparator;
end;
end
else str := fDoc.fileName;
fToolProc.Parameters.Add(str);