diff options
author | Giles Bathgate <gilesbathgate@gmail.com> | 2011-04-07 22:34:57 (GMT) |
---|---|---|
committer | Giles Bathgate <gilesbathgate@gmail.com> | 2011-04-07 22:34:57 (GMT) |
commit | 9d94eaddc86ec262c0243571d8847c8d2f649fc4 (patch) | |
tree | 13a046eb2e3f934fff86d17a852bc2a8eb6bc0e1 /src/primitives.cc | |
parent | 9357469cce78a60cb988d904c475eb8b38928827 (diff) |
Fixed for when rings <= 0.
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++) { |