mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-05 05:18:25 +02:00
xwayland: fix error path when modifier is not supported
When the modifier is not supported by the compositor, and the
DMA-BUF contains multiple planes, xwl_pixmap->buffer is NULL.
Avoid crashing when calling wl_buffer_add_listener().
Signed-off-by: Simon Ser <contact@emersion.fr>
(cherry picked from commit 76a329e55c)
This commit is contained in:
parent
29d75b092b
commit
fd27fc3f22
1 changed files with 3 additions and 2 deletions
|
|
@ -446,8 +446,9 @@ xwl_glamor_gbm_get_wl_buffer_for_pixmap(PixmapPtr pixmap)
|
|||
close(prime_fds[i]);
|
||||
|
||||
/* Add our listener now */
|
||||
wl_buffer_add_listener(xwl_pixmap->buffer,
|
||||
&xwl_glamor_gbm_buffer_listener, pixmap);
|
||||
if (xwl_pixmap->buffer)
|
||||
wl_buffer_add_listener(xwl_pixmap->buffer,
|
||||
&xwl_glamor_gbm_buffer_listener, pixmap);
|
||||
|
||||
return xwl_pixmap->buffer;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue