From e0f9dbe2dd2d4d73d55e2300fefef5dc45af9588 Mon Sep 17 00:00:00 2001 From: Pedro Rodriguez Date: Thu, 7 Feb 2019 16:53:43 +0100 Subject: [PATCH] Check if wrtc still exists (#1357) --- erizo_controller/erizoJS/models/Connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erizo_controller/erizoJS/models/Connection.js b/erizo_controller/erizoJS/models/Connection.js index dc3948bd38..f0a27705ce 100644 --- a/erizo_controller/erizoJS/models/Connection.js +++ b/erizo_controller/erizoJS/models/Connection.js @@ -121,7 +121,7 @@ class Connection extends events.EventEmitter { } _resendLastAnswer(evt, streamId, label, forceOffer = false, removeStream = false) { - if (!this.wrtc.localDescription) { + if (!this.wrtc || !this.wrtc.localDescription) { return; } this.wrtc.localDescription = new SessionDescription(this.wrtc.getLocalDescription());