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;
|
||||
/* 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);
|
||||
stride = buffer->stride;
|
||||
height = buffer->height;
|
||||
|
|
Loading…
Reference in New Issue