Ensure surface backend finish() is never called more than once.

Previously if the backend finish() function returned an error status,
surface->finished was not set true. This would result in the backend
finish() function being called twice which in the case of the PostScript
backend caused a seg fault.
This commit is contained in:
Adrian Johnson 2007-05-17 10:17:09 +09:30
parent c5ae0f1232
commit 99a6983017

View file

@ -502,10 +502,8 @@ cairo_surface_finish (cairo_surface_t *surface)
}
status = surface->backend->finish (surface);
if (status) {
if (status)
_cairo_surface_set_error (surface, status);
return;
}
surface->finished = TRUE;
}