From 3e08594c890e556e3e47bcc68719989be6cc6417 Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Mon, 9 Jan 2017 12:49:10 +0100 Subject: [PATCH] Fix rfb._cleanup() (#743) We don't have to check for _display or context here since this is a private function which is never called under such circumstances. This solves problems caused by display.get_context() which was previously removed in e549ae074fcea9febde32c0fa260a64c15cc1b8e. --- core/rfb.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/core/rfb.js b/core/rfb.js index 51350eea..c6e19731 100644 --- a/core/rfb.js +++ b/core/rfb.js @@ -444,15 +444,13 @@ }, _cleanup: function () { - if (this._display && this._display.get_context()) { - if (!this._view_only) { this._keyboard.ungrab(); } - if (!this._view_only) { this._mouse.ungrab(); } - this._display.defaultCursor(); - if (Util.get_logging() !== 'debug') { - // Show noVNC logo on load and when disconnected, unless in - // debug mode - this._display.clear(); - } + if (!this._view_only) { this._keyboard.ungrab(); } + if (!this._view_only) { this._mouse.ungrab(); } + this._display.defaultCursor(); + if (Util.get_logging() !== 'debug') { + // Show noVNC logo on load and when disconnected, unless in + // debug mode + this._display.clear(); } },