From c5cdfbd9c03c0d443e5a4f4a7eafd5ea1c2b0e21 Mon Sep 17 00:00:00 2001 From: Jonas Maebe Date: Thu, 3 Nov 2022 21:27:41 +0100 Subject: [PATCH] dwarf-eh: don't emit header if there's no data to emit --- compiler/cfidwarf.pas | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler/cfidwarf.pas b/compiler/cfidwarf.pas index fe9ac7f612..8f967830f7 100644 --- a/compiler/cfidwarf.pas +++ b/compiler/cfidwarf.pas @@ -338,6 +338,8 @@ implementation fdeofslabel, curpos: tasmlabel; tc : tai_const; begin + if DwarfList.Empty then + exit; CurrentLSDALabel:=nil; case datatype of dt_none: