diff --git a/src/game-lib-d3-renderer.js b/src/game-lib-d3-renderer.js index 01edd1d..6c36ee5 100644 --- a/src/game-lib-d3-renderer.js +++ b/src/game-lib-d3-renderer.js @@ -422,9 +422,15 @@ GameLib.D3.Renderer.prototype.render = function(delta, scenes) { GameLib.D3.Renderer.prototype.setSize = function(width, height) { this.width = width; this.height = height; - this.instance.setSize( - this.width, - this.height - ); + + if (this.instance) { + this.instance.setSize( + this.width, + this.height + ); + } else { + console.log('renderer not ready to set size'); + } + };