[cairo-xlib-surface] Handle a NULL visual along core FillRectangles path.

It is possible for an XRender capable surface to use
_cairo_xlib_surface_solid_fill_rectangle() if the surface
HAS_CREATE_PICTURE() && ! HAS_FILL_RECTANGLES(), in which case we need to
handle the surface having no associated visual.

Fixes test/xlib-expose-event.
This commit is contained in:
Chris Wilson 2008-05-28 20:32:40 +01:00
parent db32e5ffcc
commit b06bd9379a

View file

@ -1626,7 +1626,7 @@ _cairo_xlib_surface_solid_fill_rectangles (cairo_xlib_surface_t *surface,
int b = color->blue_short >> 8;
int i;
if (surface->visual->class == TrueColor) {
if (surface->visual == NULL || surface->visual->class == TrueColor) {
_characterize_field (surface->a_mask, &a_width, &a_shift);
_characterize_field (surface->r_mask, &r_width, &r_shift);
_characterize_field (surface->g_mask, &g_width, &g_shift);