diff --git a/addons/binding/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/handler/ZonePlayerHandler.java b/addons/binding/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/handler/ZonePlayerHandler.java index 49aa210177734..843d7ee66572f 100644 --- a/addons/binding/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/handler/ZonePlayerHandler.java +++ b/addons/binding/org.openhab.binding.sonos/src/main/java/org/openhab/binding/sonos/handler/ZonePlayerHandler.java @@ -1245,18 +1245,21 @@ public void playLineIn(Command command) { ZonePlayerHandler coordinatorHandler = getHandlerByName(coordinatorUDN); ZonePlayerHandler remoteHandler = getHandlerByName(remotePlayerName); - // stop whatever is currently playing - coordinatorHandler.stop(); + if(coordinatorHandler!=null && remoteHandler!=null) { - // set the URI - coordinatorHandler.setCurrentURI("x-rincon-stream:" - + remoteHandler.getConfig().get(UDN), ""); + // stop whatever is currently playing + coordinatorHandler.stop(); - // take the system off mute - coordinatorHandler.setMute(OnOffType.OFF); + // set the URI + coordinatorHandler.setCurrentURI("x-rincon-stream:" + + remoteHandler.getConfig().get(UDN), ""); - // start jammin' - coordinatorHandler.play(); + // take the system off mute + coordinatorHandler.setMute(OnOffType.OFF); + + // start jammin' + coordinatorHandler.play(); + } } }