handle slice/export with no objects on the table

This commit is contained in:
Stewart Allen 2019-01-09 19:02:44 -05:00
commit afc946dc2e

View file

@ -921,7 +921,7 @@ var gs_kiri_cam = exports;
widgetCount = widgetArray.length,
widget = widgetArray[widgetIndex];
if (widgetIndex >= widgetCount || !widget) return;
if (widgetIndex >= widgetCount || !widget || !widget.getCamBounds) return;
var slices = widget.slices,
bounds = widget.getCamBounds(settings),
@ -1370,6 +1370,8 @@ var gs_kiri_cam = exports;
* @returns {Array} gcode lines
*/
function printExport(print, online) {
if (!widget) return;
var i,
time = 0,
lines = 0,