check for null

This commit is contained in:
Milos Kozak 2016-09-08 16:53:48 +02:00
parent 2c10ade944
commit e8467ec75f

View file

@ -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