aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
diff options
context:
space:
mode:
authorlookshe <github@lookshe.org>2016-03-20 02:29:46 +0100
committerlookshe <github@lookshe.org>2016-03-20 02:29:46 +0100
commitad8e8344c0c051dd22adf76df624dd16cabcea28 (patch)
treea8e5818ef393087eb406df9d26bef3b36caa3f75 /src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java
parent6de11f38eaeb758692e0690f7150556d46d1f674 (diff)
parentfb00372269ab0ed9ed0fbc1bd502695ffc17dd1b (diff)
Merge branch 'trz/rebase' (early part) into trz/rename
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/persistance/DatabaseBackend.java4
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;