How to fix Thread 1: EXC_BAD_ACCESS (code=2, address=0x16d467fe0)

I dont know why it is doing it but it makes my app crash?

func locationAuthCheck() {
    if CLLocationManager.authorizationStatus() == .authorizedWhenInUse {
      // Get the location from the device
      currentLocation = locationManager.location

the thread1 error is on if CLLocationManager.authorizationStatus() == .authorizedWhenInUse
Did you set the string in info.plist for
NSLocationWhenInUseUsageDescription key ?
How to fix Thread 1: EXC_BAD_ACCESS (code=2, address=0x16d467fe0)
 
 
Q