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

gk at torproject.org gk at torproject.org
Tue Mar 20 11:26:34 UTC 2018


commit 4af211f30d591820516bcfcd220a293bf06a1939
Author: n8fr8 <nathan at freitas.net>
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





More information about the tbb-commits mailing list