Skip to content

Commit

Permalink
Fix Potential null pointer access
Browse files Browse the repository at this point in the history
Fixes openhab#11167

Signed-off-by: Jacob Laursen <[email protected]>
  • Loading branch information
jlaur committed Aug 27, 2021
1 parent 2c6d20b commit d7a5dc2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,12 @@ private synchronized void stopPolling() {
}

private void updateState(String groupId, String channelId, State state) {
if (valueCache.updateValue(channelId, state)) {
ValueCache cache = valueCache;
if (cache == null) {
return;
}

if (cache.updateValue(channelId, state)) {
updateState(new ChannelUID(thing.getUID(), groupId, channelId), state);
}
}
Expand Down

0 comments on commit d7a5dc2

Please sign in to comment.