Skip to content

shm: fix segfault when accessing destroyed pool resource

Simon Ser requested to merge emersion/wayland:shm-unref into main

With wl_shm_buffer_ref_pool(), it's possible for a wl_shm_pool to outlive its wl_resource. We need to be careful not to access wl_shm_pool.resource if it's been destroyed.

Reset resource to NULL in the resource destroy handler, and add NULL checks.

Signed-off-by: Simon Ser contact@emersion.fr

Merge request reports

Loading