From e5a68608a0348fe1cb1c0fb28415d420a78f2fff Mon Sep 17 00:00:00 2001 From: Johannes Mockenhaupt Date: Fri, 8 Dec 2017 12:50:52 +0100 Subject: [PATCH] Fix NPE when there's no pump. --- .../src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java index d3b605d489..64f3daf5fa 100644 --- a/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java +++ b/ruffyscripter/src/main/java/de/jotomo/ruffyscripter/RuffyScripter.java @@ -189,6 +189,9 @@ public class RuffyScripter implements RuffyCommands { @Override public synchronized void disconnect() { + if (ruffyService == null) { + return; + } try { ruffyService.doRTDisconnect(); } catch (RemoteException e) {