On Thu Sep 7 17:32:02 2023 +0000, Rémi Bernon wrote:
Is it really allowed to have NULL surface?
Yes, if the `wl_surface` (and more generally any wayland object that is used as an argument to an event) is destroyed by the client before the client queues the respective event that references it, we will get [a NULL value](https://gitlab.freedesktop.org/wayland/wayland/-/blob/edb943dc6464697ba13d7d...) for it. It is during the queuing process that libwayland [acquires an additional reference](https://gitlab.freedesktop.org/wayland/wayland/-/blob/edb943dc6464697ba13d7d...) to any object arguments to keep them alive until dispatch.