summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2011-07-11 16:48:10 -0700
committerJohn Reck <jreck@google.com>2011-07-11 16:48:10 -0700
commit24bdcb98d296f1b31e83379db27d978b90534fef (patch)
treea239f35b5ebf8f80dd1e1c584d8cf83ab809dd95 /src/com
parent017ffabc8af29b0cf14fecc6aad4a61acb8373a2 (diff)
downloadpackages_apps_browser-24bdcb98d296f1b31e83379db27d978b90534fef.zip
packages_apps_browser-24bdcb98d296f1b31e83379db27d978b90534fef.tar.gz
packages_apps_browser-24bdcb98d296f1b31e83379db27d978b90534fef.tar.bz2
Null check
Bug: 5006765 This can happen if we are destroyed before the initial load is received Change-Id: Ic285ec81abf6838eaa2fe212f55703093d5d5a86
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/browser/BrowserSnapshotPage.java6
1 files changed, 4 insertions, 2 deletions
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) {