This patch was created originally for the benefit of "abiword". It prevented an "abiword" run-time abort related to the assertion that appears below. --- cairo-1.14.6.old/src/cairo.c +++ cairo-1.14.6/src/cairo.c @@ -302,7 +302,7 @@ if (cr == NULL || CAIRO_REFERENCE_COUNT_IS_INVALID (&cr->ref_count)) return; - assert (CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&cr->ref_count)); + if (!CAIRO_REFERENCE_COUNT_HAS_REFERENCE (&cr->ref_count)) return; if (! _cairo_reference_count_dec_and_test (&cr->ref_count)) return;