Don't detach the color table vector

Change-Id: Iec7814b0aca74ddc9744af358561b18b96d7a266
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
bb10
Sérgio Martins 2015-12-13 13:53:31 +00:00 committed by Sérgio Martins
parent 3b093034b6
commit fd527592b7
1 changed files with 3 additions and 2 deletions

View File

@ -3653,8 +3653,9 @@ QImage::Format QRasterBuffer::prepare(QImage *image)
drawHelper = qDrawHelper + format;
if (image->depth() == 1 && image->colorTable().size() == 2) {
monoDestinationWithClut = true;
destColor0 = qPremultiply(image->colorTable()[0]);
destColor1 = qPremultiply(image->colorTable()[1]);
const QVector<QRgb> colorTable = image->colorTable();
destColor0 = qPremultiply(colorTable[0]);
destColor1 = qPremultiply(colorTable[1]);
}
return format;