summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2017-01-04 12:16:38 +0100
committerArne Schwabe <arne@rfc2549.org>2017-01-04 12:16:38 +0100
commit7bf4566ba2e90b4e802d8b455451c264ae17e498 (patch)
treea50c75e5d6b3d9d3eeb2e0a0ed15ada7a03830e7 /main
parent87979af6cfbb59ba130e19ee519b6283c4866144 (diff)
fix NPE
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
index 050555c6..b1b38189 100644
--- a/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
+++ b/main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java
@@ -106,7 +106,7 @@ public class ConfigConverter extends BaseActivity implements FileSelectCallback,
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
// Permission declined, do nothing
- if (grantResults[0] == PackageManager.PERMISSION_DENIED)
+ if (grantResults.length == 0 || grantResults[0] == PackageManager.PERMISSION_DENIED)
return;
// Reset file select dialogs