mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
Validate that the layer container exists before attempting to install a sync hook into the contained layer.
This commit is contained in:
@@ -1428,21 +1428,26 @@ Guacamole.Client = function(tunnel) {
|
||||
// Count active, not-ready layers and install sync tracking hooks
|
||||
for (var i=0; i<layers.length; i++) {
|
||||
|
||||
var layer = layers[i].getLayer();
|
||||
if (layer) {
|
||||
var layer_container = layer[i]
|
||||
if (layer_container) {
|
||||
|
||||
// Flush layer
|
||||
layer.flush();
|
||||
var layer = layer_container.getLayer();
|
||||
if (layer) {
|
||||
|
||||
// Flush layer
|
||||
layer.flush();
|
||||
|
||||
// If still not ready, sync later
|
||||
if (!layer.isReady()) {
|
||||
layersToSync++;
|
||||
layer.sync(syncLayer);
|
||||
}
|
||||
|
||||
// If still not ready, sync later
|
||||
if (!layer.isReady()) {
|
||||
layersToSync++;
|
||||
layer.sync(syncLayer);
|
||||
}
|
||||
|
||||
}
|
||||
} // end if layer exists
|
||||
|
||||
}
|
||||
} // end for each layer
|
||||
|
||||
// If all layers are ready, then we didn't install any hooks.
|
||||
// Send sync message now,
|
||||
|
Reference in New Issue
Block a user