Skip to content

Commit

Permalink
Fix #2368 null protect invalid PeerConnection (#2369)
Browse files Browse the repository at this point in the history
  • Loading branch information
edoshor committed Sep 25, 2020
1 parent cb97985 commit 4f0f95b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions html/janus.js
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,10 @@ function Janus(gatewayCallbacks) {
return;
}
var config = pluginHandle.webrtcStuff;
if(!config.pc) {
Janus.warn("Invalid PeerConnection");
return;
}
var onDataChannelMessage = function(event) {
Janus.log('Received message on data channel:', event);
var label = event.target.label;
Expand Down

0 comments on commit 4f0f95b

Please sign in to comment.