From 084cd3da1f34cad0f86557d22730acc35f71a29c Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Sun, 15 Dec 2024 14:14:10 +0100 Subject: [PATCH] Don't fail findUpMedia when serverConnection is null. This avoids throwing if the user changes their setting before login. Thanks to Jean-Jacques Sarton. --- static/galene.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/static/galene.js b/static/galene.js index 5a1e00e..34afd75 100644 --- a/static/galene.js +++ b/static/galene.js @@ -1761,6 +1761,8 @@ function closeUpMedia(label) { * @returns {Stream} */ function findUpMedia(label) { + if(!serverConnection) + return null; for(let id in serverConnection.up) { let c = serverConnection.up[id]; if(c.label === label)