From 7bf4566ba2e90b4e802d8b455451c264ae17e498 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 4 Jan 2017 12:16:38 +0100 Subject: fix NPE --- main/src/main/java/de/blinkt/openvpn/activities/ConfigConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main') 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 -- cgit v1.2.3