[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [orbot/master] made setEnabled() call null safe



commit a1d04487b4e2caf5204ff03385fbdf660e356293
Author: bitmold <dsnake@xxxxxxxxxxxxxx>
Date:   Fri Dec 10 14:29:11 2021 -0500

    made setEnabled() call null safe
    
    didn't see this
---
 .../org/torproject/android/core/ui/SettingsPreferencesActivity.kt     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/appcore/src/main/java/org/torproject/android/core/ui/SettingsPreferencesActivity.kt b/appcore/src/main/java/org/torproject/android/core/ui/SettingsPreferencesActivity.kt
index 04dd6266..79f00544 100644
--- a/appcore/src/main/java/org/torproject/android/core/ui/SettingsPreferencesActivity.kt
+++ b/appcore/src/main/java/org/torproject/android/core/ui/SettingsPreferencesActivity.kt
@@ -34,7 +34,7 @@ class SettingsPreferencesActivity : PreferenceActivity() {
 
         val bridgesEnabled = getSharedPreferences("org.torproject.android_preferences", MODE_MULTI_PROCESS).getBoolean("pref_bridges_enabled", false)
         findPreference("pref_be_a_snowflake")?.isEnabled = !bridgesEnabled
-        findPreference("pref_be_a_snowflake_limit").isEnabled = !bridgesEnabled
+        findPreference("pref_be_a_snowflake_limit")?.isEnabled = !bridgesEnabled
     }
 
     override fun attachBaseContext(newBase: Context) = super.attachBaseContext(LocaleHelper.onAttach(newBase))
@@ -67,4 +67,4 @@ class SettingsPreferencesActivity : PreferenceActivity() {
                     putExtra(BUNDLE_KEY_PREFERENCES_XML, xmlPrefId)
                 }
     }
-}
\ No newline at end of file
+}



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits