From 5bc3a71764619fe965a89ac5d6bce0452832f2e0 Mon Sep 17 00:00:00 2001
From: Iwan Lebron <105045937+iwanlebron@users.noreply.github.com>
Date: 星期一, 10 六月 2024 09:19:16 +0800
Subject: [PATCH] Merge pull request #1 from iwanlebron/iwanlebron-patch-1

---
 src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
index 299d59a..b87684a 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
@@ -79,7 +79,7 @@
 			// 鏁版嵁鍘婚噸
 			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);
 				}

--
Gitblit v1.8.0