Fix cycle/build with -al

assemble.pas, TExternalAssembler.WriteSourceLine:
  * don't generate an internal error if no module is found; if the system unit is compiled with -al there can be cases when fileinfo contains only zeros (though I wonder where this comes from; I'll need to investigate this when I have time)

git-svn-id: trunk@23631 -
This commit is contained in:
svenbarth 2013-02-19 10:11:39 +00:00
parent a2c068770c
commit a68e237450

View File

@ -716,9 +716,12 @@ Implementation
module:=current_module
else
module:=get_module(hp.fileinfo.moduleindex);
if not assigned(module) then
internalerror(2013021801);
infile:=module.sourcefiles.get_file(hp.fileinfo.fileindex);
{ during the compilation of the system unit there are cases when
the fileinfo contains just zeros => invalid }
if assigned(module) then
infile:=module.sourcefiles.get_file(hp.fileinfo.fileindex)
else
infile:=nil;
if assigned(infile) then
begin
{ open only if needed !! }