From 4e7f62b5ecf6ab283d29a5ff53a56eb24514a880 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Sat, 9 Feb 2013 18:16:03 -0800 Subject: [PATCH] Fix type error occurring when multiple guacamole instance are touching the same history simultaneously, and one lacks a connection available in another. --- guacamole/src/main/webapp/scripts/root-ui.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guacamole/src/main/webapp/scripts/root-ui.js b/guacamole/src/main/webapp/scripts/root-ui.js index 1b9ecae27..3b8656cfd 100644 --- a/guacamole/src/main/webapp/scripts/root-ui.js +++ b/guacamole/src/main/webapp/scripts/root-ui.js @@ -184,6 +184,10 @@ GuacamoleHistory.onchange = function(id, old_entry, new_entry) { // Ensure connection is added if (!connection) { + // If connection not actually defined, storage must be being + // modified externally. Stop early. + if (!GuacamoleRootUI.connections[id]) return; + // Create new connection connection = new GuacUI.Connection( GuacamoleRootUI.connections[id]