From cb27889deafc589910103a01b28879f8e6d0dc5a Mon Sep 17 00:00:00 2001 From: svenbarth Date: Fri, 2 Sep 2016 17:22:59 +0000 Subject: [PATCH] * fix cycling by correctly handling the case that the global symtable of a program file is Nil * also check the local symtable in that case (a program does not result in a PPU, but we need the imported symbols nevertheless when linking to a package) git-svn-id: trunk@34414 - --- compiler/symtable.pas | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/compiler/symtable.pas b/compiler/symtable.pas index 2e8ce6f3e8..e9a990e59b 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -2770,7 +2770,13 @@ implementation inc(current_module.unitmap[tglobalsymtable(owner).moduleid].refs); { Note: don't check the symtable directly as owner might be a specialize symtable which is a globalsymtable as well } - if current_module.globalsymtable.moduleid<>owner.moduleid then + if ( + assigned(current_module.globalsymtable) and + (current_module.globalsymtable.moduleid<>owner.moduleid) + ) or ( + assigned(current_module.localsymtable) and + (current_module.localsymtable.moduleid<>owner.moduleid) + ) then { symbol is imported from another unit } current_module.addimportedsym(sym); end;