mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 14:29:31 +02:00
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:
parent
abc6f21f08
commit
e005e58a07
@ -1312,8 +1312,12 @@ begin
|
||||
FHandle := QImage_create(width, height, format);
|
||||
QImage_fill(FHandle, 0);
|
||||
end
|
||||
else
|
||||
else
|
||||
begin
|
||||
FHandle := QImage_create(FData, width, height, format);
|
||||
if format=QImageFormat_Mono then
|
||||
QImage_setNumColors(FHandle, 2);
|
||||
end;
|
||||
QtGDIObjects.AddGDIObject(Self);
|
||||
end;
|
||||
|
||||
@ -1325,8 +1329,12 @@ begin
|
||||
|
||||
if FData = nil then
|
||||
FHandle := QImage_create(width, height, format)
|
||||
else
|
||||
else
|
||||
begin
|
||||
FHandle := QImage_create(FData, width, height, bytesPerLine, format);
|
||||
if format=QImageFormat_Mono then
|
||||
QImage_setNumColors(FHandle, 2);
|
||||
end;
|
||||
QtGDIObjects.AddGDIObject(Self);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user