faizalshap / react-native-otp-verify

React native sms verification without additional permissions
MIT License
251 stars 95 forks source link

Fix null object crash. #25

Closed ulion closed 3 years ago

ulion commented 3 years ago

No matter what reason, I encounter one case in which status is null, so this PR fix the crash caused by that.

NullPointerException: Attempt to invoke virtual method 'int com.google.android.gms.common.api.Status.getStatusCode()' on a null object reference at com.faizal.OtpVerify.OtpBroadcastReceiver.onReceive(OtpBroadcastReceiver.java:51)

device = Nexus 4 device.family = Nexus environment = prod event.environment = java event.origin = android hermes = true language = en level = fatal os = Android 6.0.1