<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion "(_cairo_atomic_int_get (&(&surface->ref_count)->ref_count) > 0)""
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91967#c34">Comment # 34</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Assertion "(_cairo_atomic_int_get (&(&surface->ref_count)->ref_count) > 0)""
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91967">bug 91967</a>
              from <span class="vcard"><a class="email" href="mailto:jskarvad@redhat.com" title="Jaroslav Škarvada <jskarvad@redhat.com>"> <span class="fn">Jaroslav Škarvada</span></a>
</span></b>
        <pre>(In reply to Alberts Muktupāvels from <a href="show_bug.cgi?id=91967#c33">comment #33</a>)
<span class="quote">> (In reply to Bryce Harrington from <a href="show_bug.cgi?id=91967#c32">comment #32</a>)
> > What about setting "image = NULL" after the destruction and then just adding
> > an "if (image)" before the cairo_surface_destroy call in BAIL?

> ? I guess this is exactly what my patch does, no? cairo_surface_destroy is
> NULL safe so there is no need to add 'if (image)', but if you want I can
> update patch.</span >

Yup, we are at the beginning. The 'image = NULL' will do the job as well as
stated several times in this BZ. But from the comments above and code
inspection (you mostly don't set the pointers to NULLs after destruction, but
rather use assertion) I understand that you want the code path/algorithm clean
and that that's the reason of the assertion - to detect and clean all wrong
paths.

But even with the image = NULL, you still need to add NOOP error handlers to X
calls, because they may still fail with 'invalid pixmap'. The X error handling
is asynchronous but mostly with assertion somewhere, so without the NOOP error
handlers it can also coredump sooner or later.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>