[cairo-bugs] [Bug 91967] Assertion "(_cairo_atomic_int_get (&(&surface->ref_count)->ref_count) > 0)"

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Sep 17 05:35:13 PDT 2015


--- Comment #5 from Alberts Muktupāvels <alberts.muktupavels at gmail.com> ---
Created attachment 118325
  --> https://bugs.freedesktop.org/attachment.cgi?id=118325&action=edit
cairo-xlib-surface: set image to NULL after destroying it

Please consider applying this simple patch.

Trying to destroy surface for second time results in assertion which ends with
crash. And that is serious problem.

Image at that point is already destroyed and not valid so setting it to NULL is
safe. That will prevent from trying to destroy surface for second time and more
importantly I can handle this error now in code: I can use cairo_surface_status
and/or cairo_status to detect this failure.

You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20150917/74d4da20/attachment.html>

More information about the cairo-bugs mailing list