From dfa9001ed17a6d93e66547a5e7c824b63a768ca2 Mon Sep 17 00:00:00 2001 From: ziyue <1213642868@qq.com> Date: Thu, 16 Sep 2021 10:05:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- webrtc/WebRtcSession.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webrtc/WebRtcSession.cpp b/webrtc/WebRtcSession.cpp index 03682f1d..aceac77e 100644 --- a/webrtc/WebRtcSession.cpp +++ b/webrtc/WebRtcSession.cpp @@ -76,6 +76,9 @@ void WebRtcSession::onError(const SockException &err) { //本WebRtcSession对象将在超时后自动销毁 WarnP(this) << err.what(); + if (!_transport) { + return; + } auto transport = std::move(_transport); this->Session::getPoller()->async([transport] { //延时减引用,防止使用transport对象时,销毁对象