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.
This commit is contained in:
Joel Martin 2010-11-06 12:15:08 -05:00
parent bb0573666e
commit 5286528f5b
2 changed files with 4 additions and 4 deletions

View File

@ -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();

View File

@ -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);