Gtk2: fixed crash because of misusage/fpc bug in IntersectRect.

git-svn-id: trunk@27879 -
This commit is contained in:
zeljko 2010-10-26 11:53:32 +00:00
parent 535fac5416
commit 21a209e959

View File

@ -3326,7 +3326,7 @@ var
Pixbuf: PGdkPixbuf;
pixels: pguchar;
Dest: PByte;
R: TRect;
R, R1: TRect;
i: Integer;
SourceStride, DestStride: PtrUInt;
begin
@ -3349,7 +3349,8 @@ begin
if ARect <> nil
then begin
// get intersection
IntersectRect(R, ARect^, R);
IntersectRect(R1, ARect^, R);
R := R1;
ADesc.Width := R.Right - R.Left;
ADesc.Height := R.Bottom - R.Top;
end;