diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/library_gl.js | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/library_gl.js b/src/library_gl.js index 0566b3a0..f7966dab 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -424,11 +424,9 @@ var LibraryGL = { }, glIsTexture: function(texture) { - var fb = GL.textures[texture]; - if (typeof(fb) == 'undefined') { - return 0; - } - return Module.ctx.isTexture(fb); + var texture = GL.textures[texture]; + if (!texture) return 0; + return Module.ctx.isTexture(texture); }, glGenBuffers__sig: 'vii', |