Another NPE fix when ruffy isn't available.

This commit is contained in:
Johannes Mockenhaupt 2017-12-08 13:10:54 +01:00
parent e5a68608a0
commit 2c8c25c082
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1

View file

@ -180,6 +180,9 @@ public class RuffyScripter implements RuffyCommands {
@Override @Override
public boolean isConnected() { public boolean isConnected() {
if (ruffyService == null) {
return false;
}
try { try {
return ruffyService.isConnected() && System.currentTimeMillis() - menuLastUpdated < 5000; return ruffyService.isConnected() && System.currentTimeMillis() - menuLastUpdated < 5000;
} catch (RemoteException e) { } catch (RemoteException e) {