diff options
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/firewall/SetupTetheringTask.java | 5 |
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; } |