diff --git a/src/org/thoughtcrime/securesms/database/ApnDatabase.java b/src/org/thoughtcrime/securesms/database/ApnDatabase.java index 7bd1eefa4a..76c1f92ee4 100644 --- a/src/org/thoughtcrime/securesms/database/ApnDatabase.java +++ b/src/org/thoughtcrime/securesms/database/ApnDatabase.java @@ -108,6 +108,7 @@ public class ApnDatabase { } if (cursor == null || !cursor.moveToFirst()) { + if (cursor != null) cursor.close(); Log.w(TAG, "Querying table for MCC+MNC " + mccmnc + " without APN name"); cursor = db.query(TABLE_NAME, null, BASE_SELECTION,