From dbd2fbf4301d441be4f9a04a1df6d93c81c361f6 Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Fri, 4 Mar 2022 19:23:27 -0500 Subject: view: init function should return a success bool --- sway/desktop/xwayland.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sway/desktop/xwayland.c') diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 2c6184fd..8f79b5e7 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -796,7 +796,10 @@ struct sway_xwayland_view *create_xwayland_view(struct wlr_xwayland_surface *xsu return NULL; } - view_init(&xwayland_view->view, SWAY_VIEW_XWAYLAND, &view_impl); + if (!view_init(&xwayland_view->view, SWAY_VIEW_XWAYLAND, &view_impl)) { + free(xwayland_view); + return NULL; + } xwayland_view->view.wlr_xwayland_surface = xsurface; wl_signal_add(&xsurface->events.destroy, &xwayland_view->destroy); -- cgit v1.2.3