From 24bdcb98d296f1b31e83379db27d978b90534fef Mon Sep 17 00:00:00 2001 From: John Reck Date: Mon, 11 Jul 2011 16:48:10 -0700 Subject: Null check Bug: 5006765 This can happen if we are destroyed before the initial load is received Change-Id: Ic285ec81abf6838eaa2fe212f55703093d5d5a86 --- src/com/android/browser/BrowserSnapshotPage.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/com/android/browser/BrowserSnapshotPage.java b/src/com/android/browser/BrowserSnapshotPage.java index 72da15b..44c419e 100644 --- a/src/com/android/browser/BrowserSnapshotPage.java +++ b/src/com/android/browser/BrowserSnapshotPage.java @@ -98,8 +98,10 @@ public class BrowserSnapshotPage extends Fragment implements public void onDestroyView() { super.onDestroyView(); getLoaderManager().destroyLoader(LOADER_SNAPSHOTS); - mAdapter.changeCursor(null); - mAdapter = null; + if (mAdapter != null) { + mAdapter.changeCursor(null); + mAdapter = null; + } } void setupGrid(LayoutInflater inflater) { -- cgit v1.1