From 36a7b4808a6cfa7b82aa7f5942721c105a52c80b Mon Sep 17 00:00:00 2001 From: Lucas Rocha Date: Mon, 12 Nov 2012 15:58:41 +0000 Subject: [PATCH] Bug 804600 - Fix crash when accessing about:reader with no arguments (r=mfinkle) --- mobile/android/base/BrowserApp.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mobile/android/base/BrowserApp.java b/mobile/android/base/BrowserApp.java index 70efaeb8ae1..efb1c470530 100644 --- a/mobile/android/base/BrowserApp.java +++ b/mobile/android/base/BrowserApp.java @@ -888,8 +888,11 @@ abstract public class BrowserApp extends GeckoApp desktopMode.setIcon(tab.getDesktopMode() ? R.drawable.ic_menu_desktop_mode_on : R.drawable.ic_menu_desktop_mode_off); String url = tab.getURL(); - if (ReaderModeUtils.isAboutReader(url)) - url = ReaderModeUtils.getUrlFromAboutReader(url); + if (ReaderModeUtils.isAboutReader(url)) { + String urlFromReader = ReaderModeUtils.getUrlFromAboutReader(url); + if (urlFromReader != null) + url = urlFromReader; + } // Disable share menuitem for about:, chrome:, file:, and resource: URIs String scheme = Uri.parse(url).getScheme();