[cairo] Segfault at sweep_line_delete on video playback
James Cloos
cloos at jhcloos.com
Fri Mar 21 02:54:10 PDT 2014
This diff avoids the segfault for me, but only papers over the bug...
diff --git a/src/cairo-bentley-ottmann-rectangular.c b/src/cairo-bentley-ottmann-rectangular.c
index 5541bdc..c3607cf 100644
--- a/src/cairo-bentley-ottmann-rectangular.c
+++ b/src/cairo-bentley-ottmann-rectangular.c
@@ -564,7 +564,9 @@ sweep_line_delete (sweep_line_t *sweep, rectangle_t *rectangle)
cairo_bool_t update;
update = TRUE;
+
if (sweep->fill_rule == CAIRO_FILL_RULE_WINDING &&
+ rectangle->left.prev &&
rectangle->left.prev->dir == rectangle->left.dir)
{
update = rectangle->left.next != &rectangle->right;
diff --git a/src/cairo-clip.c b/src/cairo-clip.c
index 0df9b06..736838f 100644
--- a/src/cairo-clip.c
+++ b/src/cairo-clip.c
@@ -88,7 +88,11 @@ _cairo_clip_path_reference (cairo_clip_path_t *clip_path)
void
_cairo_clip_path_destroy (cairo_clip_path_t *clip_path)
{
+ /*
assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&clip_path->ref_count));
+ */
+ if (!clip_path)
+ return;
if (! _cairo_reference_count_dec_and_test (&clip_path->ref_count))
return;
More information about the cairo
mailing list