diff --git a/core/display.js b/core/display.js index 1e197bd9..9069fa7f 100644 --- a/core/display.js +++ b/core/display.js @@ -410,10 +410,14 @@ export default class Display { } drawImage(img, x, y, w, h) { - if (img.width != w || img.height != h) { - this._drawCtx.drawImage(img, x, y, w, h); - } else { - this._drawCtx.drawImage(img, x, y); + try { + if (img.width != w || img.height != h) { + this._drawCtx.drawImage(img, x, y, w, h); + } else { + this._drawCtx.drawImage(img, x, y); + } + } catch (error) { + Log.Error('Invalid image recieved.'); //KASM-2090 } this._damage(x, y, w, h); } diff --git a/vnc.html b/vnc.html index d55537b9..4025bb6b 100644 --- a/vnc.html +++ b/vnc.html @@ -245,16 +245,6 @@ -