diff options
author | Marco Nelissen <marcone@google.com> | 2009-09-30 16:39:15 -0700 |
---|---|---|
committer | Marco Nelissen <marcone@google.com> | 2009-10-01 08:16:02 -0700 |
commit | 9b150b74573ce506abd00c692fb42f46980441a3 (patch) | |
tree | 1dc213e6af3959c213340404367410f3757974a2 | |
parent | 87b94b13ea8ad708d079ddfafe4801c12c38e57a (diff) | |
download | frameworks_base-9b150b74573ce506abd00c692fb42f46980441a3.zip frameworks_base-9b150b74573ce506abd00c692fb42f46980441a3.tar.gz frameworks_base-9b150b74573ce506abd00c692fb42f46980441a3.tar.bz2 |
Close the cursor before assigning a new one to the same variable.
-rw-r--r-- | core/java/android/provider/MediaStore.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/java/android/provider/MediaStore.java b/core/java/android/provider/MediaStore.java index 6d66296..062080d 100644 --- a/core/java/android/provider/MediaStore.java +++ b/core/java/android/provider/MediaStore.java @@ -345,6 +345,7 @@ public final class MediaStore { baseUri.buildUpon().appendPath(String.valueOf(origId)) .toString().replaceFirst("thumbnails", "media")); if (filePath == null) { + if (c != null) c.close(); c = cr.query(uri, PROJECTION, null, null, null); if (c == null || !c.moveToFirst()) { return null; |