Skip to content
This repository has been archived by the owner on Jul 2, 2021. It is now read-only.

Commit

Permalink
NPE tentative fix for DexterInstance (#246)
Browse files Browse the repository at this point in the history
* Add tentative fix for issues #243 and #221

* Prepare release 6.0.1
  • Loading branch information
pedrovgs authored Dec 2, 2019
1 parent c4aa5c9 commit 040eebc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Include the library in your ``build.gradle``

```groovy
dependencies{
implementation 'com.karumi:dexter:6.0.0'
implementation 'com.karumi:dexter:6.0.1'
}
```

Expand Down
8 changes: 6 additions & 2 deletions dexter/src/main/java/com/karumi/dexter/DexterInstance.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,12 @@ private void onPermissionsChecked(Collection<String> permissions) {
synchronized (pendingPermissionsMutex) {
pendingPermissions.removeAll(permissions);
if (pendingPermissions.isEmpty()) {
activity.finish();
activity = null;
// Just in case heck to avoid NPE if the OS destroys the activity before
// the permission is checked. Issues #243 and #221
if (activity != null) {
activity.finish();
activity = null;
}
isRequestingPermission.set(false);
rationaleAccepted.set(false);
isShowingNativeDialog.set(false);
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ POM_NAME=Dexter
POM_ARTIFACT_ID=dexter
POM_PACKAGING=aar

VERSION_NAME=6.0.1-SNAPSHOT
VERSION_NAME=6.0.1
VERSION_CODE=600001
GROUP=com.karumi

Expand Down

0 comments on commit 040eebc

Please sign in to comment.