From b239fde32dec454b29f9b11611e02862a79cd979 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 21 Nov 2019 17:31:57 +0000 Subject: [PATCH] Workaround for soft-crash with calls on startup Fixes https://github.com/vector-im/riot-web/issues/11458 --- src/components/views/voip/CallView.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/views/voip/CallView.js b/src/components/views/voip/CallView.js index a4d7927ac3..cf1f505197 100644 --- a/src/components/views/voip/CallView.js +++ b/src/components/views/voip/CallView.js @@ -90,6 +90,13 @@ module.exports = createReactClass({ } } else { call = CallHandler.getAnyActiveCall(); + // Ignore calls if we can't get the room associated with them. + // I think the underlying problem is that the js-sdk sends events + // for calls before it has made the rooms available in the store, + // although this isn't confirmed. + if (MatrixClientPeg.get().getRoom(call.roomId) === null) { + call = null; + } this.setState({ call: call }); }