diff options
Diffstat (limited to 'src/primitives.cc')
-rw-r--r-- | src/primitives.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/primitives.cc b/src/primitives.cc index f618b44..cdbb18e 100644 --- a/src/primitives.cc +++ b/src/primitives.cc @@ -279,6 +279,9 @@ PolySet *PrimitiveNode::render_polyset(render_mode_e) const int fragments = get_fragments_from_r(r1, fn, fs, fa); int rings = fragments/2; + if(rings<=0) + rings=1; + ring_s *ring = new ring_s[rings]; for (int i = 0; i < rings; i++) { |