diff --git a/lib/webrtc/call.js b/lib/webrtc/call.js index 5ec072761..84edace08 100644 --- a/lib/webrtc/call.js +++ b/lib/webrtc/call.js @@ -156,7 +156,11 @@ MatrixCall.prototype._initWithInvite = function(event) { // firefox and OpenWebRTC's RTCPeerConnection doesn't add streams until it // starts getting media on them so we need to figure out whether a video // channel has been offered by ourselves. - if (this.msg.offer.sdp.indexOf('m=video') > -1) { + if ( + this.msg.offer && + this.msg.offer.sdp && + this.msg.offer.sdp.indexOf('m=video') > -1 + ) { this.type = 'video'; } else {