mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-08 14:11:21 +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
|
// 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) {
|
if (layer_container) {
|
||||||
|
|
||||||
// Flush layer
|
var layer = layer_container.getLayer();
|
||||||
layer.flush();
|
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.
|
// If all layers are ready, then we didn't install any hooks.
|
||||||
// Send sync message now,
|
// Send sync message now,
|
||||||
|
Reference in New Issue
Block a user