aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-05-21 17:03:37 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-05-21 17:03:37 -0700
commit7f521d100446945ab45d8d88551f568d1396b6bf (patch)
tree95be0f849413578be468d0bf673490f265cae756 /src
parent10b69ba439e415073f2ebbd4b9522d43d70fba70 (diff)
fix crash when no exitPointerLock, see #1074
Diffstat (limited to 'src')
-rw-r--r--src/library_browser.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/library_browser.js b/src/library_browser.js
index 5f9c4d06..0ed04e19 100644
--- a/src/library_browser.js
+++ b/src/library_browser.js
@@ -201,7 +201,8 @@ mergeInto(LibraryManager.library, {
canvas['webkitRequestPointerLock'];
canvas.exitPointerLock = document['exitPointerLock'] ||
document['mozExitPointerLock'] ||
- document['webkitExitPointerLock'];
+ document['webkitExitPointerLock'] ||
+ function(){}; // no-op if function does not exist
canvas.exitPointerLock = canvas.exitPointerLock.bind(document);
function pointerLockChange() {