From 1ecd7f274f0917c5e4065e220f58c7850096c5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Wed, 10 Feb 2021 07:49:03 +0100 Subject: [PATCH] Cancel call if no source was selected MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- src/webrtc/call.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/webrtc/call.ts b/src/webrtc/call.ts index eb6a12f62..52e763695 100644 --- a/src/webrtc/call.ts +++ b/src/webrtc/call.ts @@ -377,6 +377,8 @@ export class MatrixCall extends EventEmitter { logger.debug("Electron getDesktopCapturerSources() is available..."); try { const selectedSource = await selectDesktopCapturerSource(); + // If no source was selected cancel call + if (!selectedSource) return; const getUserMediaOptions: MediaStreamConstraints | DesktopCapturerConstraints = { audio: false, video: {