mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-26 10:19:14 +02:00
TAChart: Avoid OpenGLDrawer crashing in case of default font and default font size.
git-svn-id: trunk@52438 -
This commit is contained in:
parent
d16215576d
commit
4361125363
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user