Commit 8171f4d8 authored by Joel Martin's avatar Joel Martin

Catch exceptions in cursor detection.

If cursor Data URI scheme detection threw an exception, it would cause
canvas initialization to fail. cursor detection exceptions should just
disable local cursor change support, not cause canvas init to fail.
parent 125d8bbb
...@@ -194,6 +194,7 @@ init: function (id) { ...@@ -194,6 +194,7 @@ init: function (id) {
for (i=0; i < 8 * 8 * 4; i++) { for (i=0; i < 8 * 8 * 4; i++) {
curDat.push(255); curDat.push(255);
} }
try {
curSave = c.style.cursor; curSave = c.style.cursor;
Canvas.changeCursor(curDat, curDat, 2, 2, 8, 8); Canvas.changeCursor(curDat, curDat, 2, 2, 8, 8);
if (c.style.cursor) { if (c.style.cursor) {
...@@ -203,6 +204,10 @@ init: function (id) { ...@@ -203,6 +204,10 @@ init: function (id) {
Util.Warn("Data URI scheme cursor not supported"); Util.Warn("Data URI scheme cursor not supported");
} }
c.style.cursor = curSave; c.style.cursor = curSave;
} catch (exc2) {
Util.Error("Data URI scheme cursor test exception: " + exc2);
conf.cursor_uri = false;
}
Canvas.colourMap = []; Canvas.colourMap = [];
Canvas.prevStyle = ""; Canvas.prevStyle = "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment