1
0
mirror of https://github.com/nerzhul/ownCloud-SMS-App.git synced 2025-06-08 08:26:09 +00:00

Fix null cursor on lastmessage and prevent a double cursor close in same func

This commit is contained in:
Loic Blot 2016-08-29 00:16:17 +02:00
parent 783ed1dc00
commit 08b54f8aa0

View File

@ -126,6 +126,9 @@ public class SmsFetcher {
// Fetch Sent SMS Message from Built-in Content Provider
Cursor c = (new SmsDataProvider(_context)).query(mbURI);
if (c == null) {
return null;
}
c.moveToNext();
@ -170,7 +173,6 @@ public class SmsFetcher {
results.put(entry);
} catch (JSONException e) {
Log.e(SmsFetcher.TAG, "JSON Exception when reading SMS Mailbox", e);
c.close();
}
c.close();