LCL, QT, set number of colors to 2 for mono images, this avoids crash if QT is compiled with debug info because then assertions are enabled

git-svn-id: trunk@40671 -
This commit is contained in:
jesus 2013-03-29 21:04:33 +00:00
parent abc6f21f08
commit e005e58a07

View File

@ -1313,7 +1313,11 @@ begin
QImage_fill(FHandle, 0);
end
else
begin
FHandle := QImage_create(FData, width, height, format);
if format=QImageFormat_Mono then
QImage_setNumColors(FHandle, 2);
end;
QtGDIObjects.AddGDIObject(Self);
end;
@ -1326,7 +1330,11 @@ begin
if FData = nil then
FHandle := QImage_create(width, height, format)
else
begin
FHandle := QImage_create(FData, width, height, bytesPerLine, format);
if format=QImageFormat_Mono then
QImage_setNumColors(FHandle, 2);
end;
QtGDIObjects.AddGDIObject(Self);
end;