Cocoa: Fix #40636: TCocoaContext.SetFont() does not update TCocoaFont reference count.

This commit is contained in:
David Jenkins 2023-12-05 14:48:35 -06:00 committed by rich2014
parent 21fc3631d5
commit c40823e236

View File

@ -1274,7 +1274,9 @@ end;
procedure TCocoaContext.SetFont(const AValue: TCocoaFont);
begin
FFont := AValue; // UpdateRefs done within property setter
if TCocoaGDIObject.UpdateRefs(FFont, AValue) then
FFont := AValue;
end;
end;
procedure TCocoaContext.SetPen(const AValue: TCocoaPen);