Re: Segfault at sweep_line_delete on video playback

James Cloos <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
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;
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.