xwayland/eglstream: Handle xwl_pixmap_get returning NULL
In xwl_glamor_eglstream_get_wl_buffer_for_pixmap. This can likely be hit
now with an SHM pixmap via the Present flip path. There might be other
corner cases.
Fixes: f3eb1684fa
"xwayland: enable MIT-SHM shared pixmaps"
Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
parent
d163e0a1d5
commit
3641c24bd0
|
@ -334,7 +334,12 @@ xwl_glamor_eglstream_destroy_pixmap(PixmapPtr pixmap)
|
|||
static struct wl_buffer *
|
||||
xwl_glamor_eglstream_get_wl_buffer_for_pixmap(PixmapPtr pixmap)
|
||||
{
|
||||
return xwl_pixmap_get(pixmap)->buffer;
|
||||
struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap);
|
||||
|
||||
if (!xwl_pixmap)
|
||||
return NULL;
|
||||
|
||||
return xwl_pixmap->buffer;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue