diff --git a/compiler/symtable.pas b/compiler/symtable.pas index 44948b61ab..5233c870e7 100644 --- a/compiler/symtable.pas +++ b/compiler/symtable.pas @@ -1082,7 +1082,8 @@ implementation destructor tabstractrecordsymtable.destroy; begin {$ifdef llvm} - fllvmst.free; + if refcount=1 then + fllvmst.free; {$endif llvm} inherited destroy; end;