[Android] Ensure cursor is closed

Geoffrey Métais git at videolan.org
Tue Feb 17 17:43:46 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Feb 17 11:48:19 2015 +0100| [82b97e1c235b693991799d98d9d13582e873025b] | committer: Geoffrey Métais

Ensure cursor is closed

CID #1270677

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=82b97e1c235b693991799d98d9d13582e873025b
---

 vlc-android/src/org/videolan/vlc/MediaDatabase.java |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/MediaDatabase.java b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
index dfa8d80..6992a9c 100644
--- a/vlc-android/src/org/videolan/vlc/MediaDatabase.java
+++ b/vlc-android/src/org/videolan/vlc/MediaDatabase.java
@@ -587,8 +587,8 @@ public class MediaDatabase {
             do {
                 mediaList.add(cursor.getString(0));
             }while (cursor.moveToNext());
-            cursor.close();
         }
+        cursor.close();
         return mediaList;
     }
 



More information about the Android mailing list