Don't try to save profile ID if there is none
[strongswan.git] / src / frontends / android / src / org / strongswan / android / ui / VpnProfileDetailActivity.java
index 5c87ba6..9e8ae2f 100644 (file)
@@ -104,7 +104,10 @@ public class VpnProfileDetailActivity extends Activity
        protected void onSaveInstanceState(Bundle outState)
        {
                super.onSaveInstanceState(outState);
-               outState.putLong(VpnProfileDataSource.KEY_ID, mId);
+               if (mId != null)
+               {
+                       outState.putLong(VpnProfileDataSource.KEY_ID, mId);
+               }
        }
 
        @Override