From 81761cae9672b202243f9d9a9caa3a6cda50e15c Mon Sep 17 00:00:00 2001 From: Jente Hidskes Date: Thu, 3 Jan 2019 13:55:38 +0100 Subject: [PATCH] Cage: fix possibly uninitialized variable --- cage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cage.c b/cage.c index b243a39..3976858 100644 --- a/cage.c +++ b/cage.c @@ -82,6 +82,7 @@ main(int argc, char *argv[]) struct wlr_xdg_shell *xdg_shell = NULL; #if CAGE_HAS_XWAYLAND struct wlr_xwayland *xwayland = NULL; + struct wlr_xcursor_manager *xcursor_manager = NULL; #endif int ret = 0; @@ -165,8 +166,7 @@ main(int argc, char *argv[]) server.new_xwayland_surface.notify = handle_xwayland_surface_new; wl_signal_add(&xwayland->events.new_surface, &server.new_xwayland_surface); - struct wlr_xcursor_manager *xcursor_manager = - wlr_xcursor_manager_create(DEFAULT_XCURSOR, XCURSOR_SIZE); + xcursor_manager = wlr_xcursor_manager_create(DEFAULT_XCURSOR, XCURSOR_SIZE); if (!xcursor_manager) { wlr_log(WLR_ERROR, "Cannot create XWayland XCursor manager"); ret = 1;