codetools: fixed crash when compiler is broken

git-svn-id: trunk@30888 -
This commit is contained in:
mattias 2011-05-24 18:45:54 +00:00
parent 4b9216499c
commit 53b56fb01a

View File

@ -7667,16 +7667,17 @@ begin
end else end else
debugln(['TFPCTargetConfigCache.Update WARNING: compiler is broken: '+Compiler+' '+ExtraOptions]); debugln(['TFPCTargetConfigCache.Update WARNING: compiler is broken: '+Compiler+' '+ExtraOptions]);
// store the list of tried and read cfg files // store the list of tried and read cfg files
for i:=0 to CfgFiles.Count-1 do begin if CfgFiles<>nil then
Filename:=CfgFiles[i]; for i:=0 to CfgFiles.Count-1 do begin
if Filename='' then continue; Filename:=CfgFiles[i];
CfgFileExists:=Filename[1]='+'; if Filename='' then continue;
Filename:=copy(Filename,2,length(Filename)); CfgFileExists:=Filename[1]='+';
CfgFileDate:=0; Filename:=copy(Filename,2,length(Filename));
if CfgFileExists then CfgFileDate:=0;
CfgFileDate:=FileAgeCached(Filename); if CfgFileExists then
ConfigFiles.Add(Filename,CfgFileExists,CfgFileDate); CfgFileDate:=FileAgeCached(Filename);
end; ConfigFiles.Add(Filename,CfgFileExists,CfgFileDate);
end;
// gather all units in all unit search paths // gather all units in all unit search paths
if (UnitPaths<>nil) and (UnitPaths.Count>0) then if (UnitPaths<>nil) and (UnitPaths.Count>0) then
Units:=GatherUnitsInSearchPaths(UnitPaths,OnProgress) Units:=GatherUnitsInSearchPaths(UnitPaths,OnProgress)