diff options
author | Jaime van Kessel <nallath@gmail.com> | 2016-09-21 12:33:25 +0300 |
---|---|---|
committer | Jaime van Kessel <nallath@gmail.com> | 2016-09-21 12:33:25 +0300 |
commit | 0aad5ef5ed98103c8f68fbc09421389acae85ee0 (patch) | |
tree | 3ab9989cff5f1256ed11c76fdff10ce79584b790 /plugins/X3DReader | |
parent | eb1d5e13d0571e3f709ad8153021513d24b05b96 (diff) |
Prevent exceptions when spine is empty
CURA-2083
Diffstat (limited to 'plugins/X3DReader')
-rw-r--r-- | plugins/X3DReader/X3DReader.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/X3DReader/X3DReader.py b/plugins/X3DReader/X3DReader.py index 42efbe84ef..f1c217da9d 100644 --- a/plugins/X3DReader/X3DReader.py +++ b/plugins/X3DReader/X3DReader.py @@ -425,6 +425,8 @@ class X3DReader(MeshReader): # All the spines are collinear. Fallback to the rotated source # XZ plane. # TODO: handle the situation where the first two spine points match + if len(spine) < 2: + return Vector(0, 0, 1) v = spine[1] - spine[0] orig_y = Vector(0, 1, 0) orig_z = Vector(0, 0, 1) |