Selaa lähdekoodia

Merge pull request #1647 from kairlec/master

修复当注销流时没有与之关联的国标通道时会出现的NPE
648540858 1 vuosi sitten
vanhempi
commit
0127d712a3

+ 4 - 1
src/main/java/com/genersoft/iot/vmp/streamPush/service/impl/StreamPushServiceImpl.java

@@ -284,7 +284,10 @@ public class StreamPushServiceImpl implements IStreamPushService {
         }
         streamPush.setPushing(false);
         if (userSetting.isUsePushingAsStatus()) {
-            gbChannelService.offline(streamPush.buildCommonGBChannel());
+            CommonGBChannel commonGBChannel = streamPush.buildCommonGBChannel();
+            if (commonGBChannel != null) {
+                gbChannelService.offline(commonGBChannel);
+            }
         }
         sendRtpServerService.deleteByStream(streamPush.getStream());
         mediaServerService.stopSendRtp(mediaServer, streamPush.getApp(), streamPush.getStream(), null);