diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2017-10-15 20:00:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-15 20:00:04 +0200 |
commit | 0ac3706d4fc107034395c190be0bb2365dd822e6 (patch) | |
tree | 879e7e6effe9f32ad76e353e9cffefa66d5cf886 | |
parent | 6df85d02e18c2f397669a6489e4f75d3ed024bf9 (diff) | |
parent | 28f52d0ea61a95503463ec27750f5610ec8b450a (diff) | |
download | AntennaPod-0ac3706d4fc107034395c190be0bb2365dd822e6.zip |
Merge pull request #2442 from ByteHamster/close-cursor
Close cursor before returning
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java index 4bec03d7e..a2ecd0a52 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java +++ b/core/src/main/java/de/danoeh/antennapod/core/storage/DBReader.java @@ -905,6 +905,7 @@ public final class DBReader { Cursor cursor = adapter.getImageCursor(ids); int imageCount = cursor.getCount(); if (imageCount == 0) { + cursor.close(); return Collections.emptyMap(); } Map<Long, FeedImage> result = new ArrayMap<>(imageCount); |