mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-09 17:00:43 +01:00
Return NULL from cairo_xlib_surface_get_xrender_format without an error
The NULL return value will only happen if the X Render extension is not available. We've already got that NULL return value documented, so it's not an error if the user asks for it. In particular, it's definitely not a surface-type mismatch.
This commit is contained in:
parent
3c018a6e5a
commit
cc94dce250
1 changed files with 1 additions and 5 deletions
|
|
@ -2168,7 +2168,7 @@ slim_hidden_def (cairo_xlib_surface_create_with_xrender_format);
|
|||
*
|
||||
* Return value: the XRenderPictFormat* with which the surface was
|
||||
* originally created, (or NULL if the surface is not an xlib surface
|
||||
* or if the Render extension is not available).
|
||||
* or if the X Render extension is not available).
|
||||
*/
|
||||
XRenderPictFormat *
|
||||
cairo_xlib_surface_get_xrender_format (cairo_surface_t *surface)
|
||||
|
|
@ -2181,10 +2181,6 @@ cairo_xlib_surface_get_xrender_format (cairo_surface_t *surface)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* And also for an xlib surface that is not an xlib-xrender surface */
|
||||
if (xlib_surface->xrender_format == NULL)
|
||||
_cairo_error_throw (CAIRO_STATUS_SURFACE_TYPE_MISMATCH);
|
||||
|
||||
return xlib_surface->xrender_format;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue