diff --git a/HISTORY.md b/HISTORY.md index 9f7bcfcf..6b409d60 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -14,6 +14,7 @@ * threads: new "pen trails (SVG)" reporter (experimental, hidden in dev) * objects, threads: adjusted rotation center of SVG-pen-trails * objects: added aspect racio governance and generator tags to trails SVGs +* threads: catch empty trails log when trying to generate a vector trails costume ## v5.3.8: * **Notable Change:** diff --git a/src/threads.js b/src/threads.js index afb0fecf..909fd496 100644 --- a/src/threads.js +++ b/src/threads.js @@ -5118,6 +5118,11 @@ Process.prototype.reportPentrailsAsSVG = function () { // +++ if (!this.context.accumulator) { stage = this.homeContext.receiver.parentThatIsA(StageMorph); + if (!stage.trailsLog.length) { + throw new Error (localize( + 'there are currently no\nvectorizable pen trail segments' + )); + } svg = stage.trailsLogAsSVG(); this.context.accumulator = { img : new Image(),