Fix crash in SVG plot
NULL fonts need to be assigned a default. KSC internal ticket #459
This commit is contained in:
parent
3ace4446e7
commit
b01715dd22
|
@ -103,6 +103,9 @@ int GraphicTextWidth( const wxString& aText, KIFONT::FONT* aFont, const VECTOR2I
|
||||||
basic_gal.SetFontBold( aBold );
|
basic_gal.SetFontBold( aBold );
|
||||||
basic_gal.SetGlyphSize( VECTOR2D( aSize ) );
|
basic_gal.SetGlyphSize( VECTOR2D( aSize ) );
|
||||||
|
|
||||||
|
if( !aFont )
|
||||||
|
aFont = KIFONT::FONT::GetFont();
|
||||||
|
|
||||||
return KiROUND( aFont->ComputeTextLineSize( &basic_gal, aText ).x );
|
return KiROUND( aFont->ComputeTextLineSize( &basic_gal, aText ).x );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue