mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-25 11:38:15 +02:00
Functions that implement the xdg_surface, toplevel and popup interfaces may depend on struct weston_desktop_client::resource. In normal circumstances, this resource can't be NULL. The xdg protocol extension forbids destroying xdg_wm_base before destroying all its child surfaces. If that happens, we disconnect the client with protocol error DEFUNCT_SURFACES (see commit "xdg-shell: handle xdg_wm_base being destroyed before its children"). But during client teardown resources are destroyed in arbitrary order, so it is possible that client resource becomes NULL before its surfaces are destroyed. This commit adds checks to avoid using NULL client resource, in order to avoid crashes. It is safe to silently do nothing in these cases, as the client is being destroyed anyway. Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com> |
||
|---|---|---|
| .. | ||
| client.c | ||
| internal.h | ||
| libweston-desktop.c | ||
| meson.build | ||
| seat.c | ||
| surface.c | ||
| xdg-shell-v6.c | ||
| xdg-shell.c | ||
| xwayland.c | ||