Fix leak in TLCLGlyphs.GetImageIndex (introduced in r58106 #50dc18646e). Entry name must be set, before adding to tree. Since the name is used as lookup (the tree "sorts" by the name).

git-svn-id: trunk@62868 -
This commit is contained in:
martin 2020-04-02 20:12:29 +00:00
parent bc7245b9bb
commit 9ff9f3ac82

View File

@ -2798,9 +2798,9 @@ begin
raise EResNotFound.CreateFmt(SResNotFound,[AResourceName]);
E := TEntry.Create;
FImageIndexes.Add(E);
E.GlyphName := AResourceName;
E.ImageIndex := Result;
FImageIndexes.Add(E);
end;
end;