Qt: fixed memleak in enumfontfamiliesex.

This commit is contained in:
Željan Rikalo 2024-01-08 08:29:34 +01:00
parent eb41784ad0
commit c7bbb0b354

View File

@ -1950,7 +1950,6 @@ begin
if QtGetFontFamilies(FontList, lpLogFont^.lfPitchAndFamily,
lpLogFont^.lfFaceName, CharsetToQtCharSet(lpLogFont^.lfCharSet)) > 0 then
begin
StylesList := QStringList_create();
for i := 0 to FontList.Count - 1 do
begin
EnumLogFont.elfLogFont.lfFaceName := FontList[i];
@ -1979,6 +1978,7 @@ begin
finally
FontList.free;
QStringList_destroy(StylesList);
QStringList_destroy(ScriptList);
CharSetList.Free;
end;
end;