From b80b2282401f6dc6b157daf9733457711dafaf82 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 30 Jul 2019 10:56:52 +0200 Subject: [PATCH] Fix QColorTransform memory leak Introduced recently when the smart-pointer was made manual. Change-Id: I29a041631e94a8e131dd29dae32975d68b386e00 Reviewed-by: Marc Mutz --- src/gui/painting/qcolorspace.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/painting/qcolorspace.cpp b/src/gui/painting/qcolorspace.cpp index 4a1ed373f5..926f2f687a 100644 --- a/src/gui/painting/qcolorspace.cpp +++ b/src/gui/painting/qcolorspace.cpp @@ -364,6 +364,7 @@ QColorTransform QColorSpacePrivate::transformationToColorSpace(const QColorSpace QColorTransform combined; auto ptr = new QColorTransformPrivate; combined.d = ptr; + combined.d->ref.ref(); ptr->colorSpaceIn = this; ptr->colorSpaceOut = out; ptr->colorMatrix = out->toXyz.inverted() * toXyz;