diff options
author | Sérgio Martins <sergio.martins@kdab.com> | 2015-12-13 13:53:31 +0000 |
---|---|---|
committer | Sérgio Martins <iamsergio@gmail.com> | 2015-12-13 19:24:59 +0000 |
commit | fd527592b7156b7b0d352faa2557924ad13e4095 (patch) | |
tree | 9008aa0e03a3f865af35b59a6cca99530f38bdef /src | |
parent | 3b093034b638a69b4dc91212d1743638864a1337 (diff) |
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 6b8136c52d..207e31d91a 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -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; |