check whether Rect is nil, prevent crash (issue #1746)

git-svn-id: trunk@8786 -
This commit is contained in:
micha 2006-02-20 22:14:30 +00:00
parent 2d4316de8b
commit e0e2b0cd0e

View File

@ -2268,8 +2268,11 @@ Begin
Flags := RDW_INVALIDATE or RDW_ALLCHILDREN;
if BErase then
Flags := Flags or RDW_ERASE;
GetLCLClientBoundsOffset(aHandle, ORect);
OffsetRect(Rect^, ORect.Left, ORect.Top);
if Rect <> nil then
begin
GetLCLClientBoundsOffset(aHandle, ORect);
OffsetRect(Rect^, ORect.Left, ORect.Top);
end;
Result := Boolean(Windows.RedrawWindow(aHandle, Windows.RECT(Rect^), 0, Flags));
End;