summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2023-08-07 03:08:33 +0200
committercyBerta <cyberta@riseup.net>2023-08-07 03:08:33 +0200
commit34539d080f2ce05eb668267180283f8332835d2c (patch)
treede4e4da4514dff3a060a5fc2b5232e19e4949946 /app/src/main
parent28f8f7124ad96670c14fd96c8e9d1caf9a7848e5 (diff)
avoid possible NPEs in ConfigureProviderFragment
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ConfigureProviderFragment.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ConfigureProviderFragment.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ConfigureProviderFragment.java
index 01bedfa0..3c36065e 100644
--- a/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ConfigureProviderFragment.java
+++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ConfigureProviderFragment.java
@@ -147,10 +147,13 @@ public class ConfigureProviderFragment extends BaseSetupFragment implements Obse
public void update(Observable o, Object arg) {
if (o instanceof TorStatusObservable) {
Activity activity = getActivity();
- if (activity == null) {
+ if (activity == null || binding == null) {
return;
}
activity.runOnUiThread(() -> {
+ if (binding == null) {
+ return;
+ }
if (TorStatusObservable.getStatus() != TorStatusObservable.TorStatus.OFF) {
if (binding.connectionDetailContainer.getVisibility() == GONE) {
showConnectionDetails();