From 8218a0cb2a8cf1724c7aeab8bf71359790e761a0 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 23 Aug 2019 13:57:30 +0200 Subject: [PATCH] Make sure showDotCursor can be modified before connecting The cursor object is only attached to our canvas whilst connecting, so we need to make sure we don't try to update anything when were not connected or we'll get a crash. --- kasmweb/core/rfb.js | 1 + 1 file changed, 1 insertion(+) diff --git a/kasmweb/core/rfb.js b/kasmweb/core/rfb.js index 639a681..58e1ac8 100644 --- a/kasmweb/core/rfb.js +++ b/kasmweb/core/rfb.js @@ -1895,6 +1895,7 @@ export default class RFB extends EventTargetMixin { } _refreshCursor() { + if (this._rfb_connection_state !== 'connected') { return; } const image = this._shouldShowDotCursor() ? RFB.cursors.dot : this._cursorImage; this._cursor.change(image.rgbaPixels, image.hotx, image.hoty,