diff options
author | Dominique Martinet <asmadeus@codewreck.org> | 2018-06-28 20:14:37 +0900 |
---|---|---|
committer | Dominique Martinet <asmadeus@codewreck.org> | 2018-06-28 20:28:15 +0900 |
commit | a3e2a77734f98311d017a21a74557041b1627739 (patch) | |
tree | 88751041083bd16ba9f2467abac09454e29cf52a | |
parent | 970687a01c953773d911032c9ab13fd080212296 (diff) |
xdg_popup: fix call to to handle_grab for inert popup
-rw-r--r-- | types/xdg_shell/wlr_xdg_popup.c | 3 | ||||
-rw-r--r-- | types/xdg_shell_v6/wlr_xdg_popup_v6.c | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/types/xdg_shell/wlr_xdg_popup.c b/types/xdg_shell/wlr_xdg_popup.c index 2435b9c4..bd969147 100644 --- a/types/xdg_shell/wlr_xdg_popup.c +++ b/types/xdg_shell/wlr_xdg_popup.c @@ -152,6 +152,9 @@ static void xdg_popup_handle_grab(struct wl_client *client, wlr_xdg_surface_from_popup_resource(resource); struct wlr_seat_client *seat_client = wlr_seat_client_from_resource(seat_resource); + if (!surface) { + return; + } if (surface->popup->committed) { wl_resource_post_error(surface->popup->resource, diff --git a/types/xdg_shell_v6/wlr_xdg_popup_v6.c b/types/xdg_shell_v6/wlr_xdg_popup_v6.c index cc6fa58a..378ae963 100644 --- a/types/xdg_shell_v6/wlr_xdg_popup_v6.c +++ b/types/xdg_shell_v6/wlr_xdg_popup_v6.c @@ -174,6 +174,9 @@ static void xdg_popup_handle_grab(struct wl_client *client, xdg_surface_from_xdg_popup_resource(resource); struct wlr_seat_client *seat_client = wlr_seat_client_from_resource(seat_resource); + if (!surface) { + return; + } if (surface->popup->committed) { wl_resource_post_error(surface->popup->resource, |