mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 11:33:06 +00:00
Add missing Cursor.close() calls to fix a crash reported on Ouya
This commit is contained in:
parent
ea65bb2c0a
commit
fcfdd4e323
@ -109,6 +109,8 @@ public class ComputerDatabaseManager {
|
||||
computerList.add(details);
|
||||
}
|
||||
|
||||
c.close();
|
||||
|
||||
return computerList;
|
||||
}
|
||||
|
||||
@ -117,6 +119,7 @@ public class ComputerDatabaseManager {
|
||||
ComputerDetails details = new ComputerDetails();
|
||||
if (!c.moveToFirst()) {
|
||||
// No matching computer
|
||||
c.close();
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -146,6 +149,8 @@ public class ComputerDatabaseManager {
|
||||
|
||||
details.macAddress = c.getString(4);
|
||||
|
||||
c.close();
|
||||
|
||||
// If a field is corrupt or missing, delete the database entry
|
||||
if (details.uuid == null || details.localIp == null || details.remoteIp == null ||
|
||||
details.macAddress == null) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user