Commit 084cd3da authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Don't fail findUpMedia when serverConnection is null.

This avoids throwing if the user changes their setting before
login.  Thanks to Jean-Jacques Sarton.
parent 0a14b78d
...@@ -1761,6 +1761,8 @@ function closeUpMedia(label) { ...@@ -1761,6 +1761,8 @@ function closeUpMedia(label) {
* @returns {Stream} * @returns {Stream}
*/ */
function findUpMedia(label) { function findUpMedia(label) {
if(!serverConnection)
return null;
for(let id in serverConnection.up) { for(let id in serverConnection.up) {
let c = serverConnection.up[id]; let c = serverConnection.up[id];
if(c.label === label) if(c.label === label)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment