carbon: make GetClipRGN safer

git-svn-id: trunk@21132 -
This commit is contained in:
dmitry 2009-08-07 10:47:16 +00:00
parent 5151e1c5ea
commit 1d4cd359c5

View File

@ -1487,7 +1487,9 @@ end;
function TCarbonDeviceContext.CopyClipRegion(ADstRegion: TCarbonRegion): Integer;
begin
Result := ADstRegion.CombineWith(FClipRegion, RGN_COPY);
if Assigned(ADstRegion)
then Result := ADstRegion.CombineWith(FClipRegion, RGN_COPY)
else Result := LCLType.Error;
end;
{ TCarbonScreenContext }