egl/wayland: do not try to access memory if allocation failed
Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11248>
This commit is contained in:
parent
af1ee8e010
commit
6c37784400
|
@ -1339,7 +1339,8 @@ dmabuf_handle_modifier(void *data, struct zwp_linux_dmabuf_v1 *dmabuf,
|
|||
BITSET_SET(dri2_dpy->formats, visual_idx);
|
||||
|
||||
mod = u_vector_add(&dri2_dpy->wl_modifiers[visual_idx]);
|
||||
*mod = combine_u32_into_u64(modifier_hi, modifier_lo);
|
||||
if (mod)
|
||||
*mod = combine_u32_into_u64(modifier_hi, modifier_lo);
|
||||
}
|
||||
|
||||
static const struct zwp_linux_dmabuf_v1_listener dmabuf_listener = {
|
||||
|
|
Loading…
Reference in New Issue