fix crash in QImage conversion benchmark

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2021-01-04 02:01:58 +02:00
parent 69201d3b64
commit e9ab364014

View file

@ -86,7 +86,7 @@ void tst_QImageConversion::convertRgb16ToRGB32()
QImage tst_QImageConversion::generateImage(int width, int height)
{
QImage image(width, height, QImage::Format_RGB16);
const int byteWidth = width * 3;
const int byteWidth = width * 2;
for (int y = 0; y < image.height(); ++y) {
uchar *scanline = image.scanLine(y);