diff options
author | cyBerta <cyberta@riseup.net> | 2023-08-07 03:08:33 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2023-08-07 03:08:33 +0200 |
commit | 34539d080f2ce05eb668267180283f8332835d2c (patch) | |
tree | de4e4da4514dff3a060a5fc2b5232e19e4949946 /app | |
parent | 28f8f7124ad96670c14fd96c8e9d1caf9a7848e5 (diff) |
avoid possible NPEs in ConfigureProviderFragment
Diffstat (limited to 'app')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/providersetup/fragments/ConfigureProviderFragment.java | 5 |
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(); |