mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 08:48:00 +02:00
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:
parent
c5ae0f1232
commit
99a6983017
1 changed files with 1 additions and 3 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue