mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-20 19:42:45 +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);
|
computerList.add(details);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c.close();
|
||||||
|
|
||||||
return computerList;
|
return computerList;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -117,6 +119,7 @@ public class ComputerDatabaseManager {
|
|||||||
ComputerDetails details = new ComputerDetails();
|
ComputerDetails details = new ComputerDetails();
|
||||||
if (!c.moveToFirst()) {
|
if (!c.moveToFirst()) {
|
||||||
// No matching computer
|
// No matching computer
|
||||||
|
c.close();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,6 +149,8 @@ public class ComputerDatabaseManager {
|
|||||||
|
|
||||||
details.macAddress = c.getString(4);
|
details.macAddress = c.getString(4);
|
||||||
|
|
||||||
|
c.close();
|
||||||
|
|
||||||
// If a field is corrupt or missing, delete the database entry
|
// If a field is corrupt or missing, delete the database entry
|
||||||
if (details.uuid == null || details.localIp == null || details.remoteIp == null ||
|
if (details.uuid == null || details.localIp == null || details.remoteIp == null ||
|
||||||
details.macAddress == null) {
|
details.macAddress == null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user