summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEirik Aavitsland <eirik.aavitsland@qt.io>2018-11-21 15:19:50 +0100
committerEirik Aavitsland <eirik.aavitsland@qt.io>2018-11-22 10:01:35 +0000
commite71b640f3cde7e748f962240489888325accbfeb (patch)
treeb9783eeee8e3f1d04c1251cbea518f57e201ebee
parent364337a27fce1fdc85f2ddece60bd3412060b79b (diff)
Fix crash when painting with pattern brush to print device on macOS
CGContextRelease was called twice, both manual and from the destructor of QMacCGContext. Change-Id: Icba7dcda37af7e1f7c72937b3dd2d2cc4ea22c63 Fixes: QTBUG-71934 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r--src/plugins/platforms/cocoa/qpaintengine_mac.mm1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qpaintengine_mac.mm b/src/plugins/platforms/cocoa/qpaintengine_mac.mm
index ce7f92f2c7..5c880b1cad 100644
--- a/src/plugins/platforms/cocoa/qpaintengine_mac.mm
+++ b/src/plugins/platforms/cocoa/qpaintengine_mac.mm
@@ -313,7 +313,6 @@ static void qt_mac_draw_pattern(void *info, CGContextRef c)
}
pat->image = qt_mac_create_imagemask(pm, pm.rect());
CGImageRelease(swatch);
- CGContextRelease(pm_ctx);
w *= QMACPATTERN_MASK_MULTIPLIER;
h *= QMACPATTERN_MASK_MULTIPLIER;
#endif