Cage: fix possibly uninitialized variable

This commit is contained in:
Jente Hidskes 2019-01-03 13:55:38 +01:00
parent 907bb78c92
commit 81761cae96
No known key found for this signature in database
GPG key ID: 04BE5A29F32D91EA

4
cage.c
View file

@ -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;