修复空指针异常

This commit is contained in:
648540858
2024-01-29 21:20:03 +08:00
parent 695f9b7f4d
commit ab34cb37f3
2 changed files with 6 additions and 0 deletions

View File

@@ -611,6 +611,10 @@ public class SIPCommander implements ISIPCommander {
*/
@Override
public void streamByeCmd(Device device, String channelId, String stream, String callId, SipSubscribe.Event okEvent) throws InvalidArgumentException, SipException, ParseException, SsrcTransactionNotFoundException {
if (device == null) {
logger.warn("[发送BYE] device为null");
return;
}
SsrcTransaction ssrcTransaction = streamSession.getSsrcTransaction(device.getDeviceId(), channelId, callId, stream);
if (ssrcTransaction == null) {
throw new SsrcTransactionNotFoundException(device.getDeviceId(), channelId, callId, stream);