I've got a simple MKMapView and when I present an UIAlertView I get an EXC_BAD_ACCESS.
The swizzled method - (BOOL)colours_getHue:(CGFloat *)hue saturation:(CGFloat *)saturation brightness:(CGFloat *)brightness alpha:(CGFloat *)alpha; is called by the MapKit framework with an alpha pointer that is NULL. This leads to writing an alpha value to the address 0x00000000 .
I fixed it by testing the alpha pointer for NULL prior to setting its value:
I've got a simple MKMapView and when I present an UIAlertView I get an EXC_BAD_ACCESS.
The swizzled method
- (BOOL)colours_getHue:(CGFloat *)hue saturation:(CGFloat *)saturation brightness:(CGFloat *)brightness alpha:(CGFloat *)alpha;
is called by the MapKit framework with analpha
pointer that is NULL. This leads to writing an alpha value to the address 0x00000000 .I fixed it by testing the alpha pointer for NULL prior to setting its value: