From 88983850f344ed548cac89c6e263c58afab1fcc0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 18 Jun 2014 17:44:26 -0700 Subject: silently ignore invalid textures in glDeleteTextures, per the spec --- src/library_gl.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/library_gl.js b/src/library_gl.js index 467470bc..e67ec29b 100644 --- a/src/library_gl.js +++ b/src/library_gl.js @@ -833,6 +833,7 @@ var LibraryGL = { for (var i = 0; i < n; i++) { var id = {{{ makeGetValue('textures', 'i*4', 'i32') }}}; var texture = GL.textures[id]; + if (!texture) continue; GLctx.deleteTexture(texture); texture.name = 0; GL.textures[id] = null; -- cgit v1.2.3-18-g5258