LazUtils: Finalize FreeTypeFont instance only when needed. Issue #29151, patch from Andrey Zubarev.

git-svn-id: trunk@50712 -
This commit is contained in:
juha 2015-12-08 19:56:21 +00:00
parent a241940af1
commit 67bbb06ba6

View File

@ -1138,7 +1138,8 @@ procedure TFreeTypeFont.DiscardInstance;
begin
if FInstanceCreated then
begin
TT_Done_Instance(FInstance);
if FreeTypeInitialized then
TT_Done_Instance(FInstance);
FInstanceCreated := false;
FGlyphTable.FreeAndClear;
end;