Skip to content

Commit 3a51dd1

Browse files
check participant shared_ptr before reference
1 parent 7ebbf7a commit 3a51dd1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bridge/src/bridge_audio_track.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ void BridgeAudioTrack::release() {
110110
released_ = true;
111111

112112
// Unpublish the track from the room
113-
if (participant_ && track_) {
113+
if (participant_ && track_ && track_->publication()) {
114114
try {
115115
participant_->unpublishTrack(track_->publication()->sid());
116116
} catch (...) {

bridge/src/bridge_video_track.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ void BridgeVideoTrack::release() {
109109
released_ = true;
110110

111111
// Unpublish the track from the room
112-
if (participant_ && track_) {
112+
if (participant_ && track_ && track_->publication()) {
113113
try {
114114
participant_->unpublishTrack(track_->publication()->sid());
115115
} catch (...) {

0 commit comments

Comments
 (0)