Prevent crash introduced in a4945c8534 when there are no hosts configured

This commit is contained in:
Synced Synapse 2016-11-16 12:10:20 +00:00
parent 361a854e1f
commit 92773ea57c
2 changed files with 3 additions and 0 deletions

View File

@ -489,6 +489,8 @@ public class HostManager {
* @param hostInfo Host for which to check version
*/
public void checkAndUpdateKodiVersion(final HostInfo hostInfo) {
if (hostInfo == null) return;
if (hostInfo.getUpdated() + KODI_VERSION_CHECK_INTERVAL_MILLIS < java.lang.System.currentTimeMillis()) {
LogUtils.LOGD(TAG, "Checking Kodi version...");
final HostConnection hostConnection = new HostConnection(hostInfo);

View File

@ -122,6 +122,7 @@ public class RemoteActivity extends BaseActivity
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
finish();
return;
}
// Set up the drawer.