Skip to content

Commit

Permalink
[rfxcom] Handle null value for speed
Browse files Browse the repository at this point in the history
Signed-off-by: Martin van Wingerden <martin@martinvw.nl>
  • Loading branch information
martinvw committed Mar 3, 2022
1 parent 620813e commit a1771cb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public enum Commands implements ByteEnumWrapperWithSupportedSubTypes<SubType> {
@Nullable
public static Commands bySpeed(SubType subType, int speed) {
for (Commands value : values()) {
if (value.supportedBySubTypes.contains(subType) && value.speed == speed) {
if (value.supportedBySubTypes.contains(subType) && value.speed != null && value.speed == speed) {
return value;
}
}
Expand Down

0 comments on commit a1771cb

Please sign in to comment.