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>
This commit is contained in:
Eirik Aavitsland 2018-11-21 15:19:50 +01:00
parent 364337a27f
commit e71b640f3c

View File

@ -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