LazBuild: Prevent a crash in LazBuild. Project.UnitResourceFileformat=Nil. Issue #37984.

git-svn-id: trunk@64074 -
This commit is contained in:
juha 2020-10-25 10:52:27 +00:00
parent 419384ae30
commit 27805e56a1

View File

@ -2161,9 +2161,10 @@ procedure TUnitInfo.SetTimeStamps;
var
ResFilename: String;
begin
fSourceChangeStep:=FSource.ChangeStep; // Indicates any change is source
fSourceChangeStep:=FSource.ChangeStep; // Indicates any change is source
// Associated LFM resource file timestamp
//if Component=nil then exit; <- Component is here always nil for some reason.
if UnitResourceFileformat=nil then exit; // Happens with LazBuild
ResFilename:=UnitResourceFileformat.GetUnitResourceFilename(Filename,true);
if FileExistsCached(ResFilename) then
fComponentLFMLoadDate:=FileAgeCached(ResFilename);