[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-52.7.2esr-8.0-1] handle #11 crash related to tor status receiver unregistering



commit 4af211f30d591820516bcfcd220a293bf06a1939
Author: n8fr8 <nathan@xxxxxxxxxxx>
Date:   Sun Aug 6 22:50:56 2017 -0400

    handle #11 crash related to tor status receiver unregistering
---
 mobile/android/base/java/org/mozilla/gecko/BrowserApp.java | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
index 47cb6249d09a..bc2885c71437 100644
--- a/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
+++ b/mobile/android/base/java/org/mozilla/gecko/BrowserApp.java
@@ -1155,7 +1155,17 @@ public class BrowserApp extends GeckoApp
             delegate.onPause(this);
         }
 
-        unregisterReceiver(torStatusReceiver);
+	if (torStatusReceiver != null)
+	{
+        	try
+        	{	 
+         		unregisterReceiver(torStatusReceiver);
+		}
+		catch (IllegalArgumentException iae)
+        	{
+			Log.w("BrowserApp","Tor status receiver couldn't be unregistered",iae);
+        	} 
+	}
     }
 
     @Override



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits