diff options
author | Phil Jones <philj56@gmail.com> | 2021-11-03 00:01:41 +0000 |
---|---|---|
committer | Phil Jones <philj56@gmail.com> | 2021-11-03 00:01:41 +0000 |
commit | c7eaec357376533a77195d355cc4711d46177121 (patch) | |
tree | 984da03364ff8e1f1492c914936b2a21b53f1886 | |
parent | 06abc015b39e0338bab88367f30d2439c4c7d41c (diff) |
Fix crash when closing a debug build.
-rw-r--r-- | src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -975,8 +975,12 @@ int main(int argc, char *argv[]) xdg_toplevel_destroy(state.window.xdg_toplevel); xdg_surface_destroy(state.window.xdg_surface); wl_surface_destroy(state.window.surface.wl_surface); - wl_keyboard_release(state.wl_keyboard); - wl_pointer_release(state.wl_pointer); + if (state.wl_keyboard != NULL) { + wl_keyboard_release(state.wl_keyboard); + } + if (state.wl_pointer != NULL) { + wl_pointer_release(state.wl_pointer); + } wl_compositor_destroy(state.wl_compositor); wl_subcompositor_destroy(state.wl_subcompositor); wl_seat_release(state.wl_seat); |