From fd527592b7156b7b0d352faa2557924ad13e4095 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Martins?= Date: Sun, 13 Dec 2015 13:53:31 +0000 Subject: Don't detach the color table vector Change-Id: Iec7814b0aca74ddc9744af358561b18b96d7a266 Reviewed-by: Olivier Goffart (Woboq GmbH) Reviewed-by: Marc Mutz --- src/gui/painting/qpaintengine_raster.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/gui/painting/qpaintengine_raster.cpp') 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 colorTable = image->colorTable(); + destColor0 = qPremultiply(colorTable[0]); + destColor1 = qPremultiply(colorTable[1]); } return format; -- cgit v1.2.3