summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/painting/qpaintengine_raster.cpp5
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;