diff options
author | Romain Guy <> | 2009-03-24 20:42:40 -0700 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2009-03-24 20:42:40 -0700 |
commit | c5aa56da9a3e3247fcc54a2e585bbe30db2f55fb (patch) | |
tree | c764b135502ade2498cc4790af6363822ea57154 | |
parent | c7fdae17639470c8803c3ff00ff331cbb1535999 (diff) | |
download | packages_apps_trebuchet-c5aa56da9a3e3247fcc54a2e585bbe30db2f55fb.zip packages_apps_trebuchet-c5aa56da9a3e3247fcc54a2e585bbe30db2f55fb.tar.gz packages_apps_trebuchet-c5aa56da9a3e3247fcc54a2e585bbe30db2f55fb.tar.bz2 |
Automated import from //branches/donutburger/...@141664,141664
-rw-r--r-- | src/com/android/launcher/LiveFolder.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com/android/launcher/LiveFolder.java b/src/com/android/launcher/LiveFolder.java index 5d727f8..44a283e 100644 --- a/src/com/android/launcher/LiveFolder.java +++ b/src/com/android/launcher/LiveFolder.java @@ -90,7 +90,13 @@ public class LiveFolder extends Folder { if (mLoadingTask != null && mLoadingTask.getStatus() == AsyncTask.Status.RUNNING) { mLoadingTask.cancel(true); } - ((LiveFolderAdapter) mContent.getAdapter()).cleanup(); + + // The adapter can be null if onClose() is called before FolderLoadingTask + // is done querying the provider + final LiveFolderAdapter adapter = (LiveFolderAdapter) mContent.getAdapter(); + if (adapter != null) { + adapter.cleanup(); + } } static class FolderLoadingTask extends AsyncTask<LiveFolderInfo, Void, Cursor> { |