diff options
author | Arne Schwabe <arne@rfc2549.org> | 2023-07-16 16:54:26 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2023-07-16 16:54:26 +0200 |
commit | 1fc6b17afa9423fc05e66fa4159aa4a229e32625 (patch) | |
tree | 7a80c9b9cb176120495d3443451f579d4539b3ba /main/src | |
parent | 46dd6fe515782e7fa38f9aa116d73fbc349d70d4 (diff) |
Fix crash on showing Routing tab [closes #1624]
Diffstat (limited to 'main/src')
-rw-r--r-- | main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt index fa7e6f55..ef69f3f4 100644 --- a/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt +++ b/main/src/ui/java/de/blinkt/openvpn/fragments/Settings_IP.kt @@ -34,18 +34,21 @@ class Settings_IP : OpenVpnPreferencesFragment(), Preference.OnPreferenceChangeL // Load the preferences from an XML resource addPreferencesFromResource(R.xml.vpn_ipsettings) - bindPreferences() - loadSettings() } override fun onViewCreated(view: View, savedInstanceState: Bundle?) { /* Bind the preferences early to avoid loadingSetting which is called * from the superclass to access an uninitialised earlyinit property */ - bindPreferences() super.onViewCreated(view, savedInstanceState) } + override fun onBindPreferences() { + super.onBindPreferences() + bindPreferences() + loadSettings() + } + private fun bindPreferences() { mIPv4 = findPreference("ipv4_address")!! mIPv6 = findPreference("ipv6_address")!! |