android: Don't try to load the profile with ID 0
[strongswan.git] / src / frontends / android / src / org / strongswan / android / ui / VpnProfileDetailActivity.java
index 73fa301..2134cb3 100644 (file)
@@ -346,7 +346,7 @@ public class VpnProfileDetailActivity extends Activity
                String alias = null;
 
                getActionBar().setTitle(R.string.add_profile);
-               if (mId != null)
+               if (mId != null && mId != 0)
                {
                        mProfile = mDataSource.getVpnProfile(mId);
                        if (mProfile != null)