mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-22 12:39:23 +02:00
lcl gtk: fixed mem leak
git-svn-id: trunk@63635 -
This commit is contained in:
parent
9ce85ae018
commit
b45ee007da
@ -1444,8 +1444,7 @@ begin
|
||||
{$ENDIF}
|
||||
If RGN = nil then
|
||||
Result := ERROR
|
||||
else
|
||||
If gdk_region_empty(RGN) then
|
||||
else if gdk_region_empty(RGN) then
|
||||
Result := NULLREGION
|
||||
else begin
|
||||
gdk_region_get_clipbox(RGN,@aRect);
|
||||
|
@ -1838,9 +1838,14 @@ begin
|
||||
and IsValidGDIObject(Src2);
|
||||
if not Continue then begin
|
||||
DebugLn('WARNING: [TGtk2WidgetSet.CombineRgn] Invalid HRGN');
|
||||
Result := Error;
|
||||
end
|
||||
else begin
|
||||
exit(Error);
|
||||
end;
|
||||
if DObj^.RefCount>1 then
|
||||
begin
|
||||
DebugLn('WARNING: [TGtk2WidgetSet.CombineRgn] Invalid Dest');
|
||||
exit(RegionType(DObj^.GDIRegionObject));
|
||||
end;
|
||||
|
||||
S1 := S1Obj^.GDIRegionObject;
|
||||
S2 := S2Obj^.GDIRegionObject;
|
||||
//DebugLn('TGtk2WidgetSet.CombineRgn A fnCombineMode=',Dbgs(fnCombineMode));
|
||||
@ -1866,14 +1871,13 @@ begin
|
||||
Result := RegionType(D);
|
||||
//DebugLn('TGtk2WidgetSet.CombineRgn B Mode=',dbgs(fnCombineMode),
|
||||
// ' S1=',GDKRegionAsString(S1),' S2=',GDKRegionAsString(S2),' D=',GDKRegionAsString(D),'');
|
||||
if (Result = NullRegion) and
|
||||
{if (Result = NullRegion) and
|
||||
((RegionType(S1) <> NullRegion) or ((RegionType(S2) <> NullRegion))) then
|
||||
begin
|
||||
DeleteObject(Dest);
|
||||
Dest := CreateEmptyRegion;
|
||||
Result := RegionType(D);
|
||||
end;
|
||||
end;
|
||||
Result := RegionType(Dest);
|
||||
end;}
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user