I have a problem where a variable is randomly deallocated or corrupted and I get an NSInvalidArgumentException. It doesn't always happen but I'm able to reproduce the problem after a few tries.
I've tried a few ways to check if the property is the right type but with no success.
Here is the variable when everything is working
Here is the variable when the app crashes
I've noticed that the "isa = (Class)" part now returns an error instead of "CLLocation" so I'm trying to check it but it's protected.
[fromPoint->isa isKindOfClass:[CLLocation class]]
I've tried the answers here but I'm still getting the exception.
Objective c isKindOfClass missunderstanding?
Thanks!