Skip to content

Commit

Permalink
set correct error code for invalid linewidth
Browse files Browse the repository at this point in the history
  • Loading branch information
mikolalysenko committed Mar 14, 2016
1 parent 097367e commit adf132f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit adf132f

Please sign in to comment.