# HG changeset patch # User bsmith@81767d24-ef19-dc11-ae90-00e081727c95 # Date 1617121059 0 # Node ID 5db33d37cc1a2c91ca449e69b2faa04f4bbb6154 # Parent 0286ac44d347e27aae8ed53b7b87760a7319e6b0 iOS: Fix crashes when creating pixmaps, pixmaps still need tons of work. But this prevents the immediate crash on creation. diff -r 0286ac44d347 -r 5db33d37cc1a ios/dw.m --- a/ios/dw.m Tue Mar 30 08:28:35 2021 +0000 +++ b/ios/dw.m Tue Mar 30 16:17:39 2021 +0000 @@ -6466,8 +6466,8 @@ if((pixmap = calloc(1,sizeof(struct _hpixmap)))) { CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); - CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, calloc(width*height, 4), width*height*32, NULL); - CGImageRef image = CGImageCreate(width, height, 8, 32, 32 * width, + CGDataProviderRef provider = CGDataProviderCreateWithData(NULL, calloc(width*height, 4), width*height*4, NULL); + CGImageRef image = CGImageCreate(width, height, 8, 32, 4 * width, rgb, kCGBitmapByteOrderDefault | kCGImageAlphaLast, provider, NULL, false, kCGRenderingIntentDefault); pixmap->width = width;