mirror of
https://github.com/photonstorm/phaser
synced 2024-12-01 00:49:41 +00:00
Fix error for headless renderer
This commit is contained in:
parent
d6e8600766
commit
50e93d2cee
1 changed files with 6 additions and 1 deletions
|
@ -12,6 +12,7 @@ var Components = require('../components');
|
|||
var CONST = require('../../const');
|
||||
var Frame = require('../../textures/Frame');
|
||||
var GameObject = require('../GameObject');
|
||||
var NOOP = require('../../utils/NOOP');
|
||||
var Render = require('./RenderTextureRender');
|
||||
var Utils = require('../../renderer/webgl/Utils');
|
||||
var UUID = require('../../utils/string/UUID');
|
||||
|
@ -274,7 +275,11 @@ var RenderTexture = new Class({
|
|||
|
||||
var renderer = this.renderer;
|
||||
|
||||
if (renderer.type === CONST.WEBGL)
|
||||
if (!renderer)
|
||||
{
|
||||
this.drawGameObject = NOOP;
|
||||
}
|
||||
else if (renderer.type === CONST.WEBGL)
|
||||
{
|
||||
var gl = renderer.gl;
|
||||
|
||||
|
|
Loading…
Reference in a new issue