Skip to content

Commit 4b79caa

Browse files
committed
fix java.lang.NullPointerException onActivityResult
1 parent a35fd2c commit 4b79caa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/android/SMSRetriever.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,9 @@ public void onActivityResult(int requestCode, int resultCode, Intent intent) {
253253

254254
}
255255
} catch (ApiException | NullPointerException ex) {
256-
getPhoneNumberCallbackContext.error(ex.getMessage());
256+
if(ex instanceof ApiException){
257+
getPhoneNumberCallbackContext.error(ex.getMessage());
258+
}
257259
ex.printStackTrace();
258260
}
259261
}

0 commit comments

Comments
 (0)