From b8337131d2e1b9a3ad0d8f619c47407b4349ea89 Mon Sep 17 00:00:00 2001 From: Michael Kolb Date: Mon, 28 Nov 2011 15:07:39 -0800 Subject: Fix NPE at startup Bug: 5676863 Change-Id: I673699e577f0ed2cfa85260f905ccccc0d852399 --- src/com/android/browser/Controller.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java index 52183eb..8dc05f8 100644 --- a/src/com/android/browser/Controller.java +++ b/src/com/android/browser/Controller.java @@ -1425,7 +1425,7 @@ public class Controller return; } MenuItem dest = menu.findItem(R.id.stop_reload_menu_id); - MenuItem src = tab.inPageLoad() ? + MenuItem src = ((tab != null) && tab.inPageLoad()) ? menu.findItem(R.id.stop_menu_id): menu.findItem(R.id.reload_menu_id); if (src != null) { -- cgit v1.1