summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorDmitri Plotnikov <dplotnikov@google.com>2010-07-15 18:56:11 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2010-07-15 18:56:11 -0700
commit90c50c4d7d4f33ba38d420b18e62d2e87cd503cf (patch)
tree742919510cfc0888640db5b8863e89e6ccecb1f9 /core/java
parent6ea3b2a5dad44b1817562d24b0d11a74da72a751 (diff)
parent4565d52bdd60490b05f9f8f7c1fd3c552974948c (diff)
downloadframeworks_base-90c50c4d7d4f33ba38d420b18e62d2e87cd503cf.zip
frameworks_base-90c50c4d7d4f33ba38d420b18e62d2e87cd503cf.tar.gz
frameworks_base-90c50c4d7d4f33ba38d420b18e62d2e87cd503cf.tar.bz2
Merge "Fixing NPE in CursorLoader"
Diffstat (limited to 'core/java')
-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;