Browse Source

dwarf-eh: don't emit header if there's no data to emit

Jonas Maebe 2 years ago
parent
commit
c5cdfbd9c0
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/cfidwarf.pas

+ 2 - 0
compiler/cfidwarf.pas

@@ -338,6 +338,8 @@ implementation
         fdeofslabel, curpos: tasmlabel;
         fdeofslabel, curpos: tasmlabel;
         tc             : tai_const;
         tc             : tai_const;
       begin
       begin
+        if DwarfList.Empty then
+          exit;
         CurrentLSDALabel:=nil;
         CurrentLSDALabel:=nil;
         case datatype of
         case datatype of
           dt_none:
           dt_none: