lcl: fix range check errors in TControl.SetBoundsRect (issue #0015004)

git-svn-id: trunk@23147 -
This commit is contained in:
paul 2009-12-15 05:56:08 +00:00
parent 4e64aed98d
commit 4d5cde8a0f

View File

@ -2532,7 +2532,7 @@ begin
DebugLn('[TControl.SetBoundsRect] ',Name,':',ClassName);
{$ENDIF}
with ARect do
SetBounds(Left,Top,Right - Left, Bottom - Top);
SetBounds(Left, Top, Max(Right - Left, 0), Max(Bottom - Top, 0));
end;
procedure TControl.SetBoundsRectForNewParent(const AValue: TRect);