GUAC-690: Do not attempt to create empty thumbnails. Do not create thumbnails if client not attached.
This commit is contained in:
1 parent
58e828bf2d
commit
9b3b0dbbeb
1 file changed
+9
-1
@@ -738,8 +738,16 @@ GuacUI.Client.Pinch = function(element) {
|
||||
*/
|
||||
GuacUI.Client.updateThumbnail = function() {
|
||||
|
||||
var guac = GuacUI.Client.attachedClient;
|
||||
if (!guac)
|
||||
return;
|
||||
|
||||
// Do not create empty thumbnails
|
||||
if (guac.getDisplay().getWidth() <= 0 || guac.getDisplay().getHeight() <= 0)
|
||||
return;
|
||||
|
||||
// Get screenshot
|
||||
var canvas = GuacUI.Client.attachedClient.getDisplay().flatten();
|
||||
var canvas = guac.getDisplay().flatten();
|
||||
|
||||
// Calculate scale of thumbnail (max 320x240, max zoom 100%)
|
||||
var scale = Math.min(
|
||||
|
||||
Reference in new issue
Block a user