Return null for invalid drawableIDs

This commit is contained in:
Ray Schamp 2017-02-18 12:18:04 -05:00
parent 6dd3c0ed81
commit 68600e794d

View File

@ -672,7 +672,7 @@ class RenderWebGL extends EventEmitter {
*/
extractDrawable (drawableID, x, y) {
const drawable = this._allDrawables[drawableID];
if (!drawable) return;
if (!drawable) return null;
const gl = this._gl;
twgl.bindFramebufferInfo(gl, this._queryBufferInfo);