mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-10 03:17:31 +01:00
cocoa: fix memory corruption
git-svn-id: trunk@34916 -
This commit is contained in:
parent
b17a03f253
commit
6e6c4d9600
@ -966,8 +966,10 @@ var
|
||||
Range: NSRange;
|
||||
begin
|
||||
Range := FLayout.glyphRangeForTextContainer(FTextContainer);
|
||||
SetLength(Result, Range.length);
|
||||
// required length + 1 space
|
||||
SetLength(Result, Range.length + 1);
|
||||
FLayout.getGlyphs_range(@Result[0], Range);
|
||||
SetLength(Result, Range.length);
|
||||
end;
|
||||
|
||||
procedure TCocoaTextLayout.Draw(ctx: NSGraphicsContext; X, Y: Integer; FillBackground: Boolean; DX: PInteger);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user