mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-01 15:50:16 +02:00
Fixes a list out of bounds exception in freetype
git-svn-id: trunk@16308 -
This commit is contained in:
parent
b6c0948bb2
commit
b87e3e5057
@ -433,11 +433,17 @@ end;
|
||||
|
||||
function TFontManager.GetFont (FontID:integer) : TMgrFont;
|
||||
begin
|
||||
result := TMgrFont(FList[FontID]);
|
||||
if result <> CurFont then // set last used size of the font as current size
|
||||
if (FontID >= 0) and (FontID < FList.Count) then
|
||||
begin
|
||||
result := TMgrFont(FList[FontID]);
|
||||
|
||||
if result <> CurFont then // set last used size of the font as current size
|
||||
begin
|
||||
CurSize := result.LastSize;
|
||||
CurSize := result.LastSize;
|
||||
end;
|
||||
end
|
||||
else
|
||||
Result := nil;
|
||||
end;
|
||||
|
||||
procedure TFontManager.GetSize (aSize, aResolution : integer);
|
||||
|
Loading…
Reference in New Issue
Block a user