check for null
This commit is contained in:
parent
2c10ade944
commit
e8467ec75f
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ public class KeepAliveReceiver extends BroadcastReceiver {
|
||||||
|
|
||||||
log.debug("KeepAlive received");
|
log.debug("KeepAlive received");
|
||||||
final DanaRPlugin danaRPlugin = (DanaRPlugin) MainApp.getSpecificPlugin(DanaRPlugin.class);
|
final DanaRPlugin danaRPlugin = (DanaRPlugin) MainApp.getSpecificPlugin(DanaRPlugin.class);
|
||||||
if (Config.DANAR && danaRPlugin.isEnabled(PluginBase.PUMP)) {
|
if (danaRPlugin != null && Config.DANAR && danaRPlugin.isEnabled(PluginBase.PUMP)) {
|
||||||
if (danaRPlugin.getDanaRPump().lastConnection.getTime() + 30 * 60 * 1000L < new Date().getTime() && !danaRPlugin.isConnected() && !danaRPlugin.isConnecting()) {
|
if (danaRPlugin.getDanaRPump().lastConnection.getTime() + 30 * 60 * 1000L < new Date().getTime() && !danaRPlugin.isConnected() && !danaRPlugin.isConnecting()) {
|
||||||
Thread t = new Thread(new Runnable() {
|
Thread t = new Thread(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue