Skip to content

Commit

Permalink
Handle channel not found
Browse files Browse the repository at this point in the history
This happens when the bridge looses one of the players, not sure how that happens. But I do get a Nullpointer on this line.
  • Loading branch information
jarlebh authored Mar 8, 2017
1 parent a6b966b commit d1c1278
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ public void handleCommand(ChannelUID channelUID, Command command) {
}

Channel channel = this.thing.getChannel(channelUID.getId());

if (channel == null) {
logger.error("Channel {} not found", channelUID.toString());
}
if (channel.getChannelTypeUID().toString().equals("heos:ch_player")) {
if (command.toString().equals("ON")) {
selectedPlayer.put(channel.getProperties().get(PID), channelUID.getId());
Expand Down

0 comments on commit d1c1278

Please sign in to comment.