summaryrefslogtreecommitdiff
path: root/src/de
diff options
context:
space:
mode:
authorArne Schwabe <arne@rfc2549.org>2012-08-27 10:31:01 +0200
committerArne Schwabe <arne@rfc2549.org>2012-08-27 10:31:01 +0200
commit9cb4568af413a6bb61511c340b4aad02a2c61667 (patch)
tree1775dbb65999f799c8d06ea304817b5476ae8ec2 /src/de
parent1b16d37437de61ef53cc7dcc2582160c251aca31 (diff)
If profiles are broken do not load them, might fix NPE from market consolev0.5.21
Diffstat (limited to 'src/de')
-rw-r--r--src/de/blinkt/openvpn/ProfileManager.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/de/blinkt/openvpn/ProfileManager.java b/src/de/blinkt/openvpn/ProfileManager.java
index a40e6fcb..d2e08a97 100644
--- a/src/de/blinkt/openvpn/ProfileManager.java
+++ b/src/de/blinkt/openvpn/ProfileManager.java
@@ -160,6 +160,10 @@ public class ProfileManager {
ObjectInputStream vpnfile = new ObjectInputStream(context.openFileInput(vpnentry + ".vp"));
VpnProfile vp = ((VpnProfile) vpnfile.readObject());
+ // Sanity check
+ if(vp==null || vp.mName==null || vp.getUUID()==null)
+ continue;
+
profiles.put(vp.getUUID().toString(), vp);
} catch (StreamCorruptedException e) {