diff options
author | Tony Crisci <tony@dubstepdish.com> | 2017-10-18 15:43:13 -0400 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2017-10-18 15:43:13 -0400 |
commit | 39308cb8688560607cb1d024123d32a7905c6369 (patch) | |
tree | e971311b5dd908a1612db066cf5aa4b316e6a021 /backend | |
parent | c00a94ca76cfc81353b78174e88539f17e9db7e0 (diff) | |
parent | a41d45eefb754e5b9a167b96728d301546b5e19c (diff) |
Merge branch 'master' into feature/data-device-selection
Diffstat (limited to 'backend')
-rw-r--r-- | backend/wayland/output.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/backend/wayland/output.c b/backend/wayland/output.c index d308b907..e1138ee1 100644 --- a/backend/wayland/output.c +++ b/backend/wayland/output.c @@ -66,10 +66,12 @@ static bool wlr_wl_output_set_cursor(struct wlr_output *_output, } if (!buf) { // Hide cursor - wl_surface_destroy(output->cursor_surface); - munmap(output->cursor_data, output->cursor_buf_size); - output->cursor_surface = NULL; - output->cursor_buf_size = 0; + if (output->cursor_surface) { + wl_surface_destroy(output->cursor_surface); + munmap(output->cursor_data, output->cursor_buf_size); + output->cursor_surface = NULL; + output->cursor_buf_size = 0; + } wlr_wl_output_update_cursor(output, output->enter_serial, hotspot_x, hotspot_y); return true; |