修复空指针异常

This commit is contained in:
648540858
2024-06-06 00:29:52 +08:00
parent 764d04b497
commit 2226d34898

View File

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