From eae7215c2eb7d357ab5edc5b99d01906ad5191c9 Mon Sep 17 00:00:00 2001 From: chundonglinlin Date: Mon, 18 Dec 2023 21:24:08 +0800 Subject: [PATCH] Forward: when unpublish crash caused by uninitialized forward connection creation.(#3901) --- trunk/src/app/srs_app_forward.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trunk/src/app/srs_app_forward.cpp b/trunk/src/app/srs_app_forward.cpp index d64b02eae0..9cb69f8212 100755 --- a/trunk/src/app/srs_app_forward.cpp +++ b/trunk/src/app/srs_app_forward.cpp @@ -94,7 +94,7 @@ srs_error_t SrsForwarder::on_publish() void SrsForwarder::on_unpublish() { trd->stop(); - sdk->close(); + if (sdk) sdk->close(); } srs_error_t SrsForwarder::on_meta_data(SrsSharedPtrMessage* shared_metadata)