TileCache: close db cursor when result is empty
This commit is contained in:
@@ -263,13 +263,13 @@ public class TileCache implements ITileCache {
|
|||||||
if (!cursor.moveToFirst()) {
|
if (!cursor.moveToFirst()) {
|
||||||
if (dbg)
|
if (dbg)
|
||||||
log.debug("not in cache {}", tile);
|
log.debug("not in cache {}", tile);
|
||||||
|
|
||||||
|
cursor.close();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
InputStream in = new ByteArrayInputStream(cursor.getBlob(0));
|
InputStream in = new ByteArrayInputStream(cursor.getBlob(0));
|
||||||
|
cursor.close();
|
||||||
if (!cursor.isClosed())
|
|
||||||
cursor.close();
|
|
||||||
|
|
||||||
if (dbg)
|
if (dbg)
|
||||||
log.debug("load tile {}", tile);
|
log.debug("load tile {}", tile);
|
||||||
|
|||||||
Reference in New Issue
Block a user