From 75c7daa2c91a5f4cf509cf8354ef97bce368fb17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Mon, 25 Oct 2021 11:44:37 +0200 Subject: [PATCH] Handle no selected screen when screen-sharing (#7018) --- src/components/views/voip/CallView.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/views/voip/CallView.tsx b/src/components/views/voip/CallView.tsx index 11206602c7..673f59190e 100644 --- a/src/components/views/voip/CallView.tsx +++ b/src/components/views/voip/CallView.tsx @@ -278,6 +278,8 @@ export default class CallView extends React.Component { if (window.electron?.getDesktopCapturerSources) { const { finished } = Modal.createDialog(DesktopCapturerSourcePicker); const [source] = await finished; + if (!source) return; + isScreensharing = await this.props.call.setScreensharingEnabled(true, source); } else { isScreensharing = await this.props.call.setScreensharingEnabled(true);