Copying from a buffer with no width/height should not fail. Hard exceptions in handlers causes layer task handling to stall.

This commit is contained in:
Michael Jumper
2012-01-10 11:37:10 -08:00
parent 6fc6122e67
commit 0a4931cb41

View File

@@ -400,7 +400,10 @@ Guacamole.Layer = function(width, height) {
function doCopyRect() {
if (layer.autosize != 0) fitRect(x, y, srcw, srch);
displayContext.drawImage(srcLayer.getCanvas(), srcx, srcy, srcw, srch, x, y, srcw, srch);
var srcCanvas = srcLayer.getCanvas();
if (srcCanvas.width != 0 && srcCanvas.height != 0)
displayContext.drawImage(srcCanvas, srcx, srcy, srcw, srch, x, y, srcw, srch);
}
// If we ARE the source layer, no need to sync.