model might not be set yet
So don't try to read its length right away. Closes #2267
This commit is contained in:
parent
900e8a2aaf
commit
743d590d52
1 changed files with 1 additions and 1 deletions
|
|
@ -69,7 +69,7 @@ GCODE.renderer = (function(){
|
|||
ctx.clearRect(p1.x,p1.y,p2.x-p1.x,p2.y-p1.y);
|
||||
drawGrid();
|
||||
drawBoundingBox();
|
||||
if(renderOptions['showNextLayer'] && layerNumStore < model.length - 1) {
|
||||
if (renderOptions['showNextLayer'] && model && model.length && layerNumStore < model.length - 1) {
|
||||
drawLayer(layerNumStore + 1, 0, GCODE.renderer.getLayerNumSegments(layerNumStore + 1), true);
|
||||
}
|
||||
if (renderOptions['showPreviousLayer'] && layerNumStore > 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue