Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
Fixes NPE in souliss binding (#5370)
Browse files Browse the repository at this point in the history
* Fixes NPE in souliss binding

The NPE happens for all items that are not of souliss type. The fix is rather ugly, but it works.
  • Loading branch information
rymdbullen authored and kaikreuzer committed Dec 1, 2017
1 parent e694eda commit b9f4473
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -132,6 +132,10 @@ public void receiveCommand(String itemName, Command command) {

// Get the typical defined in the hash table
SoulissGenericTypical T = SoulissGenericBindingProvider.SoulissTypicalsRecipients.getTypicalFromItem(itemName);
if (T == null) {
logger.debug("receiveCommand - itemName '{}' not a SoulissTypical", itemName);
return;
}
logger.info("receiveCommand - {} = {} - Typical: 0x{}", itemName, command, Integer.toHexString(T.getType()));

switch (T.getType()) {
Expand Down

0 comments on commit b9f4473

Please sign in to comment.