Should check if error param is null
Fixed memory leak in croppedImage method