Validate that the layer container exists before attempting to install a sync hook into the contained layer.

This commit is contained in:
Michael Jumper
2013-12-06 12:01:52 -08:00
parent ccf8b17150
commit d673212da6

View File

@@ -1428,7 +1428,10 @@ Guacamole.Client = function(tunnel) {
// Count active, not-ready layers and install sync tracking hooks // Count active, not-ready layers and install sync tracking hooks
for (var i=0; i<layers.length; i++) { for (var i=0; i<layers.length; i++) {
var layer = layers[i].getLayer(); var layer_container = layer[i]
if (layer_container) {
var layer = layer_container.getLayer();
if (layer) { if (layer) {
// Flush layer // Flush layer
@@ -1442,7 +1445,9 @@ Guacamole.Client = function(tunnel) {
} }
} } // end if layer exists
} // end for each layer
// If all layers are ready, then we didn't install any hooks. // If all layers are ready, then we didn't install any hooks.
// Send sync message now, // Send sync message now,