From 2bfff9d4ce1abe625739e5d1e36963d8ca63b7ec Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 4 Jan 2022 18:18:34 +0100 Subject: [PATCH] Fix crash when trying tp draw a text with over-bar. (missing initialization of a pointer) Fixes #10252 https://gitlab.com/kicad/code/kicad/issues/10252 --- common/font/stroke_font.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/font/stroke_font.cpp b/common/font/stroke_font.cpp index 9f10559153..cfac3f1cc7 100644 --- a/common/font/stroke_font.cpp +++ b/common/font/stroke_font.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2012 Torsten Hueter, torstenhtr gmx.de * Copyright (C) 2013 CERN * @author Maciej Suminski - * Copyright (C) 2016-2022 Kicad Developers, see change_log.txt for contributors. + * Copyright (C) 2016-2022 Kicad Developers, see AUTHORS.txt for contributors. * * Stroke font class * @@ -292,7 +292,7 @@ VECTOR2I STROKE_FONT::GetTextAsGlyphs( BOX2I* aBoundingBox, if( aTextStyle & TEXT_STYLE::OVERBAR ) { - std::unique_ptr overbarGlyph; + std::unique_ptr overbarGlyph = std::make_unique(); barOffset.y = ComputeOverbarVerticalPosition( glyphSize.y );