TAChart: Avoid OpenGLDrawer crashing in case of default font and default font size.

git-svn-id: trunk@52438 -
This commit is contained in:
wp 2016-06-04 14:03:28 +00:00
parent d16215576d
commit 4361125363

View File

@ -705,7 +705,9 @@ end;
procedure TOpenGLDrawer.SetFont(AFont: TFPCustomFont);
begin
FFontName := AFont.Name;
if Sametext(FFontName, 'default') then FFontName := 'Arial';
FFontSize := AFont.Size;
if FFontSize = 0 then FFontSize := 10;
FFontStyle := 0;
if AFont.Bold then inc(FFontStyle, 1);
if AFont.Italic then inc(FFontStyle, 2);