Skip to content

Commit 6f7dc0d

Browse files
authored
Merge pull request #306 from grit96/patch-1
Fix potential NullPointerException in hasPermissions
2 parents 698f795 + 4950657 commit 6f7dc0d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

android/src/main/java/io/wazo/callkeep/RNCallKeepModule.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,10 @@ private String getApplicationName(Context appContext) {
507507

508508
private Boolean hasPermissions() {
509509
Activity currentActivity = this.getCurrentActivity();
510+
511+
if (currentActivity == null) {
512+
return false;
513+
}
510514

511515
boolean hasPermissions = true;
512516
for (String permission : permissions) {

0 commit comments

Comments
 (0)