mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-09-29 05:06:35 +00:00
libweston/noop-renderer: Check shm_buffer for NULL
Copy the check from the pixman renderer. Fixes: https://gitlab.freedesktop.org/wayland/weston/-/issues/953 Signed-off-by: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
This commit is contained in:
parent
2e51def212
commit
0e451e8dc3
|
@ -94,6 +94,12 @@ noop_renderer_attach(struct weston_paint_node *pnode)
|
||||||
}
|
}
|
||||||
|
|
||||||
shm_buffer = buffer->shm_buffer;
|
shm_buffer = buffer->shm_buffer;
|
||||||
|
/* This can happen if a SHM wl_buffer gets destroyed before we attach,
|
||||||
|
* because wayland-server just nukes the wl_shm_buffer from underneath
|
||||||
|
* us. */
|
||||||
|
if (!shm_buffer)
|
||||||
|
return;
|
||||||
|
|
||||||
data = wl_shm_buffer_get_data(shm_buffer);
|
data = wl_shm_buffer_get_data(shm_buffer);
|
||||||
stride = buffer->stride;
|
stride = buffer->stride;
|
||||||
height = buffer->height;
|
height = buffer->height;
|
||||||
|
|
Loading…
Reference in a new issue