summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Feck <cfeck@kde.org>2016-12-06 15:22:07 (GMT)
committerChristoph Feck <cfeck@kde.org>2016-12-06 15:22:07 (GMT)
commit8f6d726fce8fae49991d8f4c9062cbedba70e58a (patch)
tree85537d647aa17f9167d4dccb0f8c793d0178e466
parent8484a55f4f368b92b44332c35d67b63adf9b34c7 (diff)
Fix crash when updating the scaler
The color correction transform needs to be updated even if it was already created, because a change in image depth or format may require an updated transform. BUG: 357548 FIXED-IN: 16.12
-rw-r--r--lib/documentview/rasterimageview.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/documentview/rasterimageview.cpp b/lib/documentview/rasterimageview.cpp
index 2131c07..02e18a6 100644
--- a/lib/documentview/rasterimageview.cpp
+++ b/lib/documentview/rasterimageview.cpp
@@ -314,9 +314,7 @@ void RasterImageView::slotDocumentIsAnimatedUpdated()
void RasterImageView::updateFromScaler(int zoomedImageLeft, int zoomedImageTop, const QImage& image)
{
if (d->mApplyDisplayTransform) {
- if (!d->mDisplayTransform) {
- d->updateDisplayTransform(image.format());
- }
+ d->updateDisplayTransform(image.format());
if (d->mDisplayTransform) {
quint8 *bytes = const_cast<quint8*>(image.bits());
cmsDoTransform(d->mDisplayTransform, bytes, bytes, image.width() * image.height());