From 4052b2153a3d988f5c98e78cae68dfece23cd968 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Mon, 18 Jan 2021 21:16:48 -0500 Subject: [PATCH] Fix an ASAN issue in SCH_SHEET --- eeschema/sch_sheet.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eeschema/sch_sheet.cpp b/eeschema/sch_sheet.cpp index 6290d57d02..ebd2bd15c3 100644 --- a/eeschema/sch_sheet.cpp +++ b/eeschema/sch_sheet.cpp @@ -114,6 +114,9 @@ SCH_SHEET::SCH_SHEET( const SCH_SHEET& aSheet ) : m_pins.back()->SetParent( this ); } + for( SCH_FIELD& field : m_fields ) + field.SetParent( this ); + m_borderWidth = aSheet.m_borderWidth; m_borderColor = aSheet.m_borderColor; m_backgroundColor = aSheet.m_backgroundColor;