修复空指针异常

pull/1489/head
648540858 2024-06-06 00:29:52 +08:00
parent 764d04b497
commit 2226d34898
1 changed files with 1 additions and 1 deletions

View File

@ -79,7 +79,7 @@ public class EventPublisher {
// 数据去重 // 数据去重
Set<String> gbIdSet = new HashSet<>(); Set<String> gbIdSet = new HashSet<>();
for (DeviceChannel deviceChannel : deviceChannels) { for (DeviceChannel deviceChannel : deviceChannels) {
if (!gbIdSet.contains(deviceChannel.getChannelId())) { if (deviceChannel != null && deviceChannel.getChannelId() != null && !gbIdSet.contains(deviceChannel.getChannelId())) {
gbIdSet.add(deviceChannel.getChannelId()); gbIdSet.add(deviceChannel.getChannelId());
channels.add(deviceChannel); channels.add(deviceChannel);
} }