diff options
author | lookshe <github@lookshe.org> | 2016-03-20 02:29:46 +0100 |
---|---|---|
committer | lookshe <github@lookshe.org> | 2016-03-20 02:29:46 +0100 |
commit | ad8e8344c0c051dd22adf76df624dd16cabcea28 (patch) | |
tree | a8e5818ef393087eb406df9d26bef3b36caa3f75 /src/main/java/de/thedevstack/conversationsplus/persistance | |
parent | 6de11f38eaeb758692e0690f7150556d46d1f674 (diff) | |
parent | fb00372269ab0ed9ed0fbc1bd502695ffc17dd1b (diff) |
Merge branch 'trz/rebase' (early part) into trz/rename
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/persistance')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java index b6accd1e..ea7edb99 100644 --- a/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java +++ b/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java @@ -416,8 +416,10 @@ public class DatabaseBackend extends SQLiteOpenHelper { Cursor cursor = db.query(ServiceDiscoveryResult.TABLENAME, null, ServiceDiscoveryResult.HASH + "=? AND " + ServiceDiscoveryResult.VER + "=?", selectionArgs, null, null, null); - if (cursor.getCount() == 0) + if (cursor.getCount() == 0) { + cursor.close(); return null; + } cursor.moveToFirst(); ServiceDiscoveryResult result = null; |