Fix crash in SVG plot

NULL fonts need to be assigned a default.

KSC internal ticket #459
This commit is contained in:
Seth Hillbrand 2022-01-05 17:26:18 -08:00
parent 3ace4446e7
commit b01715dd22
1 changed files with 3 additions and 0 deletions

View File

@ -103,6 +103,9 @@ int GraphicTextWidth( const wxString& aText, KIFONT::FONT* aFont, const VECTOR2I
basic_gal.SetFontBold( aBold );
basic_gal.SetGlyphSize( VECTOR2D( aSize ) );
if( !aFont )
aFont = KIFONT::FONT::GetFont();
return KiROUND( aFont->ComputeTextLineSize( &basic_gal, aText ).x );
}