From e6d6c5c56ea854db20f537c827b53342f75fcc5c Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 9 Dec 2015 19:43:44 -0800 Subject: [PATCH] GUAC-1428: Do not call handlers on non-existent streams. --- guacamole-common-js/src/main/webapp/modules/Client.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/guacamole-common-js/src/main/webapp/modules/Client.js b/guacamole-common-js/src/main/webapp/modules/Client.js index 463049687..51d5914bd 100644 --- a/guacamole-common-js/src/main/webapp/modules/Client.js +++ b/guacamole-common-js/src/main/webapp/modules/Client.js @@ -691,7 +691,8 @@ Guacamole.Client = function(tunnel) { var stream = streams[stream_index]; // Write data - stream.onblob(data); + if (stream && stream.onblob) + stream.onblob(data); }, @@ -890,7 +891,7 @@ Guacamole.Client = function(tunnel) { var stream = streams[stream_index]; // Signal end of stream - if (stream.onend) + if (stream && stream.onend) stream.onend(); },