cairo: Avoid using cairo_t for a destroyed cairo_surface_t.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 26 Dec 2020 05:54:48 +0000 (21:54 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 26 Dec 2020 06:04:43 +0000 (22:04 -0800)
xr_pager_destroy() would destroy the latest cairo_t, if there was one.
Generally there wasn't, since in the common case it got destroyed by
xr_pager_run() when the fsm emptied out, but in the case of the last page
in a produced output file, xr_destroy() would call xr_pager_destroy()
after first destroying the surface_t it was drawing on.  I don't think this
is an actual bug, because everything is properly reference-counted inside
Cairo (the cairo_t holds a reference on its cairo_surface_t) but I found it
confusing.


No differences found