From 455e4657f62eed6c006fb8c63caf2088ba6bc30d Mon Sep 17 00:00:00 2001 From: Joel Martin Date: Sat, 6 Nov 2010 12:15:08 -0500 Subject: [PATCH] default_controls.js: canvas fail fix. Misc cleanup. - Make sure that canvas exists (i.e. didn't throw an error) before trying to call canvas method get_canvas_uri. - Typos in HTML render engine debug output. --- include/canvas.js | 6 +++--- include/default_controls.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/canvas.js b/include/canvas.js index f63f8010..baa2fd5d 100644 --- a/include/canvas.js +++ b/include/canvas.js @@ -16,7 +16,7 @@ conf = conf || {}; // Configuration var that = {}, // Public API interface // Private Canvas namespace variables - c_forceCanvas = false, + c_forceCanvas = false, c_width = 0, c_height = 0, @@ -109,8 +109,8 @@ function constructor() { if (UE.gecko) { Util.Debug("Browser: gecko " + UE.gecko); } if (UE.webkit) { Util.Debug("Browser: webkit " + UE.webkit); } - if (UE.trident) { Util.Debug("Browser: webkit " + UE.trident); } - if (UE.presto) { Util.Debug("Browser: webkit " + UE.presto); } + if (UE.trident) { Util.Debug("Browser: trident " + UE.trident); } + if (UE.presto) { Util.Debug("Browser: presto " + UE.presto); } that.clear(); diff --git a/include/default_controls.js b/include/default_controls.js index 071ac518..4582682a 100644 --- a/include/default_controls.js +++ b/include/default_controls.js @@ -247,7 +247,7 @@ settingsDisabled: function(disabled, rfb) { //Util.Debug(">> settingsDisabled"); $('VNC_encrypt').disabled = disabled; $('VNC_true_color').disabled = disabled; - if (rfb && rfb.get_canvas().get_cursor_uri()) { + if (rfb && rfb.get_canvas() && rfb.get_canvas().get_cursor_uri()) { $('VNC_cursor').disabled = disabled; } else { DefaultControls.updateSetting('cursor', false);