From 6a2de36578f2a4c7f5a71422808a8b85a6db346e Mon Sep 17 00:00:00 2001 From: m2049r Date: Sun, 12 Aug 2018 13:31:25 +0200 Subject: [PATCH] prevent unregisterReceiver if not registered (#387) --- app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java b/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java index 7b5e78b2..7e293fc5 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java +++ b/app/src/main/java/com/m2049r/xmrwallet/LoginActivity.java @@ -1276,7 +1276,10 @@ public class LoginActivity extends BaseActivity BroadcastReceiver detachReceiver; private void unregisterDetachReceiver() { - if (detachReceiver != null) unregisterReceiver(detachReceiver); + if (detachReceiver != null) { + unregisterReceiver(detachReceiver); + detachReceiver = null; + } } private void registerDetachReceiver() {