gdk: fix crash if visual is NULL

cairo_xlib_surface_get_visual might return NULL so we need to
check for NULL before trying to use it.

https://bugzilla.gnome.org/show_bug.cgi?id=752520
parent 02577ddb
......@@ -326,6 +326,9 @@ glx_pixmap_get (cairo_surface_t *surface, guint texture_target)
None
};
if (visual == NULL)
return NULL;
with_alpha = cairo_surface_get_content (surface) == CAIRO_CONTENT_COLOR_ALPHA;
y_inverted = FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment