mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 09:59:20 +02:00
Gtk2: fixed crash because of misusage/fpc bug in IntersectRect.
git-svn-id: trunk@27879 -
This commit is contained in:
parent
535fac5416
commit
21a209e959
@ -3326,7 +3326,7 @@ var
|
|||||||
Pixbuf: PGdkPixbuf;
|
Pixbuf: PGdkPixbuf;
|
||||||
pixels: pguchar;
|
pixels: pguchar;
|
||||||
Dest: PByte;
|
Dest: PByte;
|
||||||
R: TRect;
|
R, R1: TRect;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
SourceStride, DestStride: PtrUInt;
|
SourceStride, DestStride: PtrUInt;
|
||||||
begin
|
begin
|
||||||
@ -3349,7 +3349,8 @@ begin
|
|||||||
if ARect <> nil
|
if ARect <> nil
|
||||||
then begin
|
then begin
|
||||||
// get intersection
|
// get intersection
|
||||||
IntersectRect(R, ARect^, R);
|
IntersectRect(R1, ARect^, R);
|
||||||
|
R := R1;
|
||||||
ADesc.Width := R.Right - R.Left;
|
ADesc.Width := R.Right - R.Left;
|
||||||
ADesc.Height := R.Bottom - R.Top;
|
ADesc.Height := R.Bottom - R.Top;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user