ERROR_CG_DataProvidedCreateWithData_BufferIsNotBigEnough in iOS 13.1

Hi,


I am getting a crash (always at same place) in iOS 13.1 - ERROR_CG_DataProvidedCreateWithData_BufferIsNotBigEnough

It was working before.


CGRect bounds = CGRectMake((targetSize.width - thumbSize.width) * 0.5, (targetSize.height - thumbSize.height) * 0.5, thumbSize.width, thumbSize.height);
  UIGraphicsBeginImageContextWithOptions(targetSize, NO, normalizedScale);
  [self drawInRect:bounds]; <<< ERROR_CG_DataProvidedCreateWithData_BufferIsNotBigEnough
  UIImage* result = UIGraphicsGetImageFromCurrentImageContext();
  UIGraphicsEndImageContext();

Did got something similar?


Thanks!

ERROR_CG_DataProvidedCreateWithData_BufferIsNotBigEnough in iOS 13.1
 
 
Q