Fix headless renderer compatibility.

This commit is contained in:
Ben Richards 2024-02-09 18:57:13 +13:00
parent 9ab82970c7
commit 5ac59c1890

View file

@ -187,7 +187,7 @@ var TextureManager = new Class({
this.addBase64('__DEFAULT', config.defaultImage);
this.addBase64('__MISSING', config.missingImage);
this.addBase64('__WHITE', config.whiteImage);
if (this.game.renderer.gl)
if (this.game.renderer && this.game.renderer.gl)
{
this.addUint8Array('__NORMAL', new Uint8Array([ 127, 127, 255, 255 ]), 1, 1);
}