diff --git a/webgl.js b/webgl.js index 9204f46e..9f1f722e 100644 --- a/webgl.js +++ b/webgl.js @@ -2728,6 +2728,10 @@ gl.isEnabled = function isEnabled (cap) { var _lineWidth = gl.lineWidth gl.lineWidth = function lineWidth (width) { + if (isNaN(width)) { + setError(this, gl.INVALID_VALUE) + return + } return _lineWidth.call(this, +width) }