Skip to content

compositor: do not clear dmabuf pointer for busy buffers

Philipp Zabel requested to merge pH5/weston:fix-dmabuf-fade-out into main

Stop writing weston_buffer::shm_buffer when buffer type is not WESTON_BUFFER_SHM. weston_buffer::shm_buffer aliases with weston_buffer::dmabuf, which must not be cleared while the buffer may still be used.

Since commit c08a6ff8 ("compositor/renderer: Only attach buffer to renderer in repaint"), when using the desktop shell with the [shell] close-animation=fade option set, closing a dmabuf window, for example weston-simple-egl, would crash the compositor when gl_renderer_attach(), called from paint_node_update_late(), would try to access the dmabuf via weston_buffer::dmabuf that was already cleared.

Merge request reports

Loading