qt: if mask has been requested then create it anyway even empty (discussion of #0011902)

git-svn-id: trunk@16138 -
This commit is contained in:
paul 2008-08-19 07:21:52 +00:00
parent 3dc4969f21
commit 428e708b0c
2 changed files with 6 additions and 5 deletions

View File

@ -351,10 +351,8 @@ begin
Result := ABitmap <> 0;
if ASkipMask then Exit;
if ARawImage.Mask = nil then Exit;
if ARawImage.MaskSize = 0 then Exit;
if ARawImage.MaskSize > 0 then
if (ARawImage.Mask <> nil) and (ARawImage.MaskSize > 0) then
begin
NewData := GetMem(ARawImage.MaskSize);
Move(ARawImage.Mask^, NewData^, ARawImage.MaskSize);

View File

@ -892,7 +892,10 @@ begin
FDataOwner := ADataOwner;
if FData = nil then
Handle := QImage_create(width, height, format)
begin
Handle := QImage_create(width, height, format);
QImage_fill(Handle, 0);
end
else
Handle := QImage_create(FData, width, height, format);
end;