summaryrefslogtreecommitdiff
path: root/src/cairo-bentley-ottmann.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-09-16 12:35:45 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-09-16 13:49:24 +0100
commita0ec977944b7659a3fee7a97ce2e650d775bdf8e (patch)
tree5a2ceeaf4ac8b20c06e4da8b548d3c971d16a3d9 /src/cairo-bentley-ottmann.c
parent0aabde231431d94eec50304b3f3b428965f83a39 (diff)
downloadcairo-a0ec977944b7659a3fee7a97ce2e650d775bdf8e.tar.gz
bentley-ottman: End subsumed colinear traps
I'm not quite sure how we end up with a pair of colinear edges both with a deferred trap... Fixes crash in bug-bo-ricotz Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-bentley-ottmann.c')
-rw-r--r--src/cairo-bentley-ottmann.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/cairo-bentley-ottmann.c b/src/cairo-bentley-ottmann.c
index 634da6f1a..f30449eef 100644
--- a/src/cairo-bentley-ottmann.c
+++ b/src/cairo-bentley-ottmann.c
@@ -1434,12 +1434,18 @@ _active_edges_to_traps (cairo_bo_edge_t *pos,
left = pos;
while (pos != NULL) {
if (pos != left && pos->deferred_trap.right) {
- if (edges_colinear (left, pos)) {
+ /* XXX It shouldn't be possible to here with 2 deferred traps
+ * on colinear edges... See bug-bo-rictoz.
+ */
+ if (left->deferred_trap.right == NULL &&
+ edges_colinear (left, pos))
+ {
/* continuation on left */
- assert (left->deferred_trap.right == NULL);
left->deferred_trap = pos->deferred_trap;
pos->deferred_trap.right = NULL;
- } else {
+ }
+ else
+ {
status = _cairo_bo_edge_end_trap (pos, top, traps);
if (unlikely (status))
return status;