summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java b/app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java
index 8bb197b1..49febc24 100644
--- a/app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java
+++ b/app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java
@@ -52,7 +52,10 @@ public class SetupTetheringTask extends AsyncTask<Void, Boolean, Boolean> {
try {
boolean hasBitmaskChain = runBlockingCmd(bitmaskChain, log) == 0;
boolean allowSu = log.toString().contains("uid=0");
- callbackWeakReference.get().onSuRequested(allowSu);
+ FirewallCallback callback = callbackWeakReference.get();
+ if (callback != null) {
+ callback.onSuRequested(allowSu);
+ }
if (!allowSu) {
return false;
}