防止访问空指针

This commit is contained in:
ziyue 2021-09-08 18:06:40 +08:00
parent 02da99e285
commit c025b5092d

View File

@ -967,10 +967,7 @@ void WebRtcTransportImp::onBeforeEncryptRtp(const char *buf, int &len, void *ctx
void WebRtcTransportImp::onShutdown(const SockException &ex){
WarnL << ex.what();
unrefSelf(ex);
if (_session) {
_session->shutdown(ex);
_session = nullptr;
}
_session->shutdown(ex);
}
/////////////////////////////////////////////////////////////////////////////////////////////