aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-02-25 00:26:22 -0500
committerGitHub <noreply@github.com>2018-02-25 00:26:22 -0500
commitf5260361c807f4bd7fd77eda19bf1c914ffafb48 (patch)
tree8ca4cfc962652fd09c5508ec6ff42af6ca39cb1d
parent9dc868a27fde02acd5f61baf3ebd9ca98f26d420 (diff)
parent99e6cba3c307396e95ef1a4034c701db88b187ce (diff)
Merge pull request #668 from dlrobertson/fix_null_deref
Fix null deref in wlr_libinput_backend_destroy
-rw-r--r--backend/libinput/backend.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c
index 71fe0d93..1e7c1ad4 100644
--- a/backend/libinput/backend.c
+++ b/backend/libinput/backend.c
@@ -118,7 +118,9 @@ static void wlr_libinput_backend_destroy(struct wlr_backend *wlr_backend) {
wl_list_remove(&backend->session_signal.link);
wlr_list_finish(&backend->wlr_device_lists);
- wl_event_source_remove(backend->input_event);
+ if (backend->input_event) {
+ wl_event_source_remove(backend->input_event);
+ }
libinput_unref(backend->libinput_context);
free(backend);
}