[tor-commits] [orbot/master] ensure textview is not null for #379
n8fr8 at torproject.org
n8fr8 at torproject.org
Mon Aug 24 21:02:52 UTC 2020
commit d6b6d5cb8b3d7c3cc92e708a4b87fc34f4e008f8
Author: n8fr8 <nathan at guardianproject.info>
Date: Thu Aug 20 08:57:20 2020 -0400
ensure textview is not null for #379
---
.../torproject/android/ui/onboarding/BridgeWizardActivity.java | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
index f641c81d..86cd3544 100644
--- a/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
+++ b/app/src/main/java/org/torproject/android/ui/onboarding/BridgeWizardActivity.java
@@ -207,8 +207,14 @@ public class BridgeWizardActivity extends AppCompatActivity {
@Override
public void onSaveInstanceState(Bundle savedInstanceState) {
- savedInstanceState.putInt(BUNDLE_KEY_TV_STATUS_VISIBILITY, mTvStatus.getVisibility());
- savedInstanceState.putString(BUNDLE_KEY_TV_STATUS_TEXT, mTvStatus.getText().toString());
+
+ if (mTvStatus != null) {
+ savedInstanceState.putInt(BUNDLE_KEY_TV_STATUS_VISIBILITY, mTvStatus.getVisibility());
+
+ if (!TextUtils.isEmpty(mTvStatus.getText()))
+ savedInstanceState.putString(BUNDLE_KEY_TV_STATUS_TEXT, mTvStatus.getText().toString());
+ }
+
super.onSaveInstanceState(savedInstanceState);
}
More information about the tor-commits
mailing list