mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-15 08:00:34 +01:00
surface: Propagate the error status to _cairo_surface_get_device()
If the surface is in error, the appropriate action is report the error using an inert error cairo_device_t. Reported-by: Benjamin Otte <otte@redhat.com>
This commit is contained in:
parent
005596907f
commit
bd17b898b1
1 changed files with 3 additions and 0 deletions
|
|
@ -231,6 +231,9 @@ _cairo_surface_allocate_unique_id (void)
|
|||
cairo_device_t *
|
||||
cairo_surface_get_device (cairo_surface_t *surface)
|
||||
{
|
||||
if (unlikely (surface->status))
|
||||
return _cairo_device_create_in_error (surface->status);
|
||||
|
||||
return surface->device;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue