summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorDmitri Plotnikov <dplotnikov@google.com>2010-07-15 18:24:07 -0700
committerDmitri Plotnikov <dplotnikov@google.com>2010-07-15 18:24:07 -0700
commit4565d52bdd60490b05f9f8f7c1fd3c552974948c (patch)
tree7c192e58e1084ec92db1a83c0d580f08ba545d7c /core
parent0761cea3bfec86d5fe08b3fa7f4484266f36024c (diff)
downloadframeworks_base-4565d52bdd60490b05f9f8f7c1fd3c552974948c.zip
frameworks_base-4565d52bdd60490b05f9f8f7c1fd3c552974948c.tar.gz
frameworks_base-4565d52bdd60490b05f9f8f7c1fd3c552974948c.tar.bz2
Fixing NPE in CursorLoader
Change-Id: I8d005473166f43dd018ac304ff9ec606e90483a3
Diffstat (limited to 'core')
-rw-r--r--core/java/android/content/CursorLoader.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/content/CursorLoader.java b/core/java/android/content/CursorLoader.java
index e230394..01bf968 100644
--- a/core/java/android/content/CursorLoader.java
+++ b/core/java/android/content/CursorLoader.java
@@ -50,7 +50,9 @@ public class CursorLoader extends AsyncTaskLoader<Cursor> {
public void deliverResult(Cursor cursor) {
if (mStopped) {
// An async query came in while the loader is stopped
- cursor.close();
+ if (cursor != null) {
+ cursor.close();
+ }
return;
}
mCursor = cursor;