summaryrefslogtreecommitdiff
path: root/src/primitives.cc
diff options
context:
space:
mode:
authorGiles Bathgate <gilesbathgate@gmail.com>2011-08-14 19:57:46 (GMT)
committerGiles Bathgate <gilesbathgate@gmail.com>2011-08-14 19:59:22 (GMT)
commit8196385438caa45aef6ddd2dbae26a431d704268 (patch)
tree4c2f7d1bf26a263ca8df31a4ff6327d635b747ea /src/primitives.cc
parent224572585963a8b63258572a238a68b3c48d6d0d (diff)
Fix for crash caused by 0-sized square as reported by chrysn.
Diffstat (limited to 'src/primitives.cc')
-rw-r--r--src/primitives.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/primitives.cc b/src/primitives.cc
index 5180c16..45b2da3 100644
--- a/src/primitives.cc
+++ b/src/primitives.cc
@@ -434,7 +434,7 @@ sphere_next_r2:
}
}
- if (type == SQUARE)
+ if (type == SQUARE && x > 0 && y > 0)
{
double x1, x2, y1, y2;
if (center) {
contact: Jan Huwald // Impressum