sway

i3-compatible Wayland compositor
git clone https://git.awy.one/sway
Log | Files | Refs | README | LICENSE

commit 1c368fbb5fcd8fb67040bcc12bd71c7fbf119e97
parent 07bfeb2abcb46b5f1472d53963478fa0714fb5b1
Author: Filip Szczepański <jazz2rulez@gmail.com>
Date:   Mon, 12 Sep 2022 22:53:09 +0100

Fix crash in xdg_activation_v1.c

wlr_xdg_surface_from_wlr_surface() can return a NULL pointer, so check for NULL before dereferencing it.
Diffstat:
Msway/xdg_activation_v1.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/sway/xdg_activation_v1.c b/sway/xdg_activation_v1.c @@ -11,6 +11,9 @@ void xdg_activation_v1_handle_request_activate(struct wl_listener *listener, struct wlr_xdg_surface *xdg_surface = wlr_xdg_surface_from_wlr_surface(event->surface); + if (xdg_surface == NULL) { + return; + } struct sway_view *view = xdg_surface->data; if (!xdg_surface->mapped || view == NULL) { return;