summaryrefslogtreecommitdiff
path: root/src/de/blinkt/openvpn/fragments/Utils.java
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2014-02-12 00:01:13 +0100
committerArne Schwabe <arne@rfc2549.org>2014-02-12 00:01:13 +0100
commit99e3acbc8656509bc974a1772a6a648c829af665 (patch)
tree0e6c8a5ea9870e45586cf56a0249f7c7122a30eb /src/de/blinkt/openvpn/fragments/Utils.java
parent71caad4182aef2230c320a0cf8576ed61954fb27 (diff)
Bug Fixes
Diffstat (limited to 'src/de/blinkt/openvpn/fragments/Utils.java')
-rw-r--r--src/de/blinkt/openvpn/fragments/Utils.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/de/blinkt/openvpn/fragments/Utils.java b/src/de/blinkt/openvpn/fragments/Utils.java
index 6f06f35a..9117f158 100644
--- a/src/de/blinkt/openvpn/fragments/Utils.java
+++ b/src/de/blinkt/openvpn/fragments/Utils.java
@@ -167,7 +167,7 @@ public class Utils {
String prefix = "";
try {
- if (cursor.moveToFirst()) {
+ if (cursor!=null && cursor.moveToFirst()) {
int cidx = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME);
if (cidx != -1) {
String displayName = cursor.getString(cidx);
@@ -177,7 +177,8 @@ public class Utils {
}
}
} finally {
- cursor.close();
+ if(cursor!=null)
+ cursor.close();
}
switch (ft) {