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
This commit is contained in:
jean-pierre charras 2022-01-04 18:18:34 +01:00
parent a09741597f
commit 2bfff9d4ce
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@
* Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
* Copyright (C) 2013 CERN
* @author Maciej Suminski <maciej.suminski@cern.ch>
* 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<STROKE_GLYPH> overbarGlyph;
std::unique_ptr<STROKE_GLYPH> overbarGlyph = std::make_unique<STROKE_GLYPH>();
barOffset.y = ComputeOverbarVerticalPosition( glyphSize.y );