commit | 24bdcb98d296f1b31e83379db27d978b90534fef | [log] [tgz] |
---|---|---|
author | John Reck <jreck@google.com> | Mon Jul 11 16:48:10 2011 -0700 |
committer | John Reck <jreck@google.com> | Mon Jul 11 16:48:10 2011 -0700 |
tree | a239f35b5ebf8f80dd1e1c584d8cf83ab809dd95 | |
parent | 017ffabc8af29b0cf14fecc6aad4a61acb8373a2 [diff] |
Null check Bug: 5006765 This can happen if we are destroyed before the initial load is received Change-Id: Ic285ec81abf6838eaa2fe212f55703093d5d5a86
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 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) {