Commit d6fb5dcb authored by Committed by Carlos Garcia Campos
Fix a crash in the cairo backend with Type 3 glyphs
Commit 86b7e8a3 ("Ensure cairo renders Type 3 glyphs with only the fill color") introduced a bug into the Cairo backend, causing evince to crash with the message evince: cairo-pattern.c:679: cairo_pattern_destroy: Assertion `((*&(&pattern->ref_count)->ref_count) > 0)' failed. Fix this by updating reference counts to the fill and stroke patterns when modifying them in beginType3Char. Simplify the code as well by not saving the old stroke pattern before overriding it; this is already done since beginType3Char/endType3Char is wrapped by calls to saveState/restoreState in Gfx::doShowText.
Showing with 3 additions and 3 deletions