diff --git a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/CrashHandler.java b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/CrashHandler.java index b81be3035dc8..ba8b55d34b6b 100644 --- a/mobile/android/geckoview/src/main/java/org/mozilla/gecko/CrashHandler.java +++ b/mobile/android/geckoview/src/main/java/org/mozilla/gecko/CrashHandler.java @@ -56,10 +56,12 @@ public class CrashHandler implements Thread.UncaughtExceptionHandler { */ public static Throwable getRootException(final Throwable exc) { Throwable cause; + Throwable result = exc; for (cause = exc; cause != null; cause = cause.getCause()) { + result = cause; } - return cause; + return result; } /**