Skip to content

Commit

Permalink
Merge pull request #139 from VismaLietuva/master
Browse files Browse the repository at this point in the history
prevents crash if onActivityResult receives intent as null
  • Loading branch information
lampaa authored Mar 21, 2020
2 parents 2fa54b4 + 762f905 commit 47ff3d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/android/startApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent intent) {
result.put("_ACTION_requestCode_", requestCode);
result.put("_ACTION_resultCode_", resultCode);

Bundle bundle = intent.getExtras();
Bundle bundle = intent == null ? null : intent.getExtras();
if (bundle != null) {
for (String key : bundle.keySet()) {
result.put(key, bundle.get(key));
Expand All @@ -405,4 +405,4 @@ public void onActivityResult(int requestCode, int resultCode, Intent intent) {
callbackContext.sendPluginResult(pluginResult);
}
}
}
}

0 comments on commit 47ff3d4

Please sign in to comment.