android: Fix null pointer dereference with existing profiles
authorTobias Brunner <tobias@strongswan.org>
Mon, 3 Jul 2017 11:43:53 +0000 (13:43 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 3 Jul 2017 11:43:53 +0000 (13:43 +0200)
src/frontends/android/app/src/main/java/org/strongswan/android/data/VpnProfile.java

index f4e2899..8288684 100644 (file)
@@ -284,7 +284,7 @@ public class VpnProfile implements Cloneable
 
        public Integer getFlags()
        {
-               return mFlags;
+               return mFlags == null ? 0 : mFlags;
        }
 
        public void setFlags(Integer flags)