Don't try to save profile ID if there is none
authorTobias Brunner <tobias@strongswan.org>
Tue, 14 Aug 2012 09:31:37 +0000 (11:31 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 14 Aug 2012 10:01:41 +0000 (12:01 +0200)
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