mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-25 11:45:49 +01:00
Fix NPE in UpnpIOServiceImpl (#4038)
Fix #4037 Signed-off-by: Jan N. Klug <github@klug.nrw>
This commit is contained in:
parent
6495f4e256
commit
a6401fa4ac
@ -156,11 +156,13 @@ public class UpnpIOServiceImpl implements UpnpIOService, RegistryListener {
|
||||
for (UpnpIOParticipant participant : participants) {
|
||||
if (Objects.equals(getDevice(participant), deviceRoot)) {
|
||||
for (Entry<String, StateVariableValue> entry : values.entrySet()) {
|
||||
try {
|
||||
participant.onValueReceived(entry.getKey(), entry.getValue().getValue().toString(),
|
||||
serviceId);
|
||||
} catch (Exception e) {
|
||||
logger.error("Participant threw an exception onValueReceived", e);
|
||||
Object value = entry.getValue().getValue();
|
||||
if (value != null) {
|
||||
try {
|
||||
participant.onValueReceived(entry.getKey(), value.toString(), serviceId);
|
||||
} catch (Exception e) {
|
||||
logger.error("Participant threw an exception onValueReceived", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user