diff --git a/app/src/main/java/com/topjohnwu/magisk/utils/CallbackHandler.java b/app/src/main/java/com/topjohnwu/magisk/utils/CallbackHandler.java index 65e994006..cfc5a3e57 100644 --- a/app/src/main/java/com/topjohnwu/magisk/utils/CallbackHandler.java +++ b/app/src/main/java/com/topjohnwu/magisk/utils/CallbackHandler.java @@ -17,10 +17,9 @@ public class CallbackHandler { } public static void unRegister(Event event) { - HashSet list = listeners.get(event); + HashSet list = listeners.remove(event); if (list != null) { list.clear(); - listeners.remove(event); } }