Closed Kamalnrf closed 3 years ago
Here, if cursor query returns null because the underlying content provider returns null, or if it crashes. mContactsPromise is not initialised and is null so invoking it in else block would cause a NullPointerException.
mContactsPromise
https://github.com/streem/react-native-select-contact/blob/979fb3d5b616f2f6156c9fd09308e2f965d482a0/android/src/main/java/com/streem/selectcontact/SelectContactModule.java#L71
Here, if cursor query returns null because the underlying content provider returns null, or if it crashes.
mContactsPromise
is not initialised and is null so invoking it in else block would cause a NullPointerException.https://github.com/streem/react-native-select-contact/blob/979fb3d5b616f2f6156c9fd09308e2f965d482a0/android/src/main/java/com/streem/selectcontact/SelectContactModule.java#L71