From 1023637da371597ec0868de48a01243516faff2a Mon Sep 17 00:00:00 2001 From: ukanth Date: Sat, 19 Oct 2019 19:06:57 +0530 Subject: [PATCH] Nullpointer exception when ipv6 is disabled --- aFWall/src/main/java/dev/ukanth/ufirewall/Api.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aFWall/src/main/java/dev/ukanth/ufirewall/Api.java b/aFWall/src/main/java/dev/ukanth/ufirewall/Api.java index c874a6934..87b86ac36 100644 --- a/aFWall/src/main/java/dev/ukanth/ufirewall/Api.java +++ b/aFWall/src/main/java/dev/ukanth/ufirewall/Api.java @@ -897,11 +897,13 @@ public static void applySavedIptablesRules(Context ctx, boolean showErrors, Root } t1.start(); - t2.start(); + if (G.enableIPv6()) { + t2.start(); + } try { t1.join(); - if (t2 != null) { + if (G.enableIPv6() && t2 != null) { t2.join(); } } catch (InterruptedException e) {