From 7d76b9ef7691931c769d7775be08eca96bc87a39 Mon Sep 17 00:00:00 2001 From: Keith Bowes Date: Tue, 18 Feb 2020 17:51:32 -0500 Subject: [PATCH] Don't segfault on termination --- waybox/server.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/waybox/server.c b/waybox/server.c index feafd68..f0f449f 100644 --- a/waybox/server.c +++ b/waybox/server.c @@ -199,13 +199,12 @@ bool start_wb(struct wb_server* server) { } bool terminate_wb(struct wb_server* server) { + wb_cursor_destroy(server->cursor); + wb_seat_destroy(server->seat); + wlr_output_layout_destroy(server->layout); wl_display_destroy(server->wl_display); printf("Display destroyed.\n"); - wb_cursor_destroy(server->cursor); - wb_seat_destroy(server->seat); - wlr_output_layout_destroy(server->layout); - return true; }