diff options
Diffstat (limited to 'src/cursor.c')
-rw-r--r-- | src/cursor.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cursor.c b/src/cursor.c index 078b55d..ffa1562 100644 --- a/src/cursor.c +++ b/src/cursor.c @@ -146,8 +146,10 @@ void gsr_cursor_deinit(gsr_cursor *self) { self->texture_id = 0; } - XISelectEvents(self->display, DefaultRootWindow(self->display), NULL, 0); - XFixesSelectCursorInput(self->display, DefaultRootWindow(self->display), 0); + if(self->display) { + XISelectEvents(self->display, DefaultRootWindow(self->display), NULL, 0); + XFixesSelectCursorInput(self->display, DefaultRootWindow(self->display), 0); + } self->display = NULL; self->egl = NULL; |