summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/activities/ConfigConverter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/de/blinkt/openvpn/activities/ConfigConverter.java')
-rw-r--r--src/de/blinkt/openvpn/activities/ConfigConverter.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/activities/ConfigConverter.java b/src/de/blinkt/openvpn/activities/ConfigConverter.java
index e999fe9f..792c9796 100644
--- a/src/de/blinkt/openvpn/activities/ConfigConverter.java
+++ b/src/de/blinkt/openvpn/activities/ConfigConverter.java
@@ -512,7 +512,7 @@ public class ConfigConverter extends ListActivity implements FileSelectCallback
try {
- if (cursor.moveToFirst()) {
+ if (cursor!=null && cursor.moveToFirst()) {
int cidx = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);
if (cidx != -1) {
@@ -526,7 +526,8 @@ public class ConfigConverter extends ListActivity implements FileSelectCallback
}
}
} finally {
- cursor.close();
+ if(cursor!=null)
+ cursor.close();
}
if (possibleName != null) {
possibleName = possibleName.replace(".ovpn", "");