diff --git a/libweston/noop-renderer.c b/libweston/noop-renderer.c index 06b4aebc..58d0b668 100644 --- a/libweston/noop-renderer.c +++ b/libweston/noop-renderer.c @@ -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;