diff options
Diffstat (limited to 'main/src/ui')
-rw-r--r-- | main/src/ui/java/de/blinkt/openvpn/activities/VPNPreferences.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/activities/VPNPreferences.java b/main/src/ui/java/de/blinkt/openvpn/activities/VPNPreferences.java index 49d4161c..2c9eb761 100644 --- a/main/src/ui/java/de/blinkt/openvpn/activities/VPNPreferences.java +++ b/main/src/ui/java/de/blinkt/openvpn/activities/VPNPreferences.java @@ -115,12 +115,16 @@ public class VPNPreferences extends BaseActivity { if(savedUUID!=null) mProfileUUID=savedUUID; } + super.onCreate(savedInstanceState); mProfile = ProfileManager.get(this,mProfileUUID); - if(mProfile!=null) { - setTitle(getString(R.string.edit_profile_title, mProfile.getName())); + if(mProfile==null) { + Toast.makeText(this, "Profile to edit cannot be found.", Toast.LENGTH_LONG).show(); + finish(); + return; } - super.onCreate(savedInstanceState); + + setTitle(getString(R.string.edit_profile_title, mProfile.getName())); setContentView(R.layout.main_activity); |