From 36284defd05bf0dc89516e0ee381af86e703e45b Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Thu, 6 Jun 2019 11:17:42 +1000 Subject: [PATCH] path: initialize the quirks context after error checking Signed-off-by: Peter Hutterer --- src/path-seat.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/path-seat.c b/src/path-seat.c index 48e8c683..5ed239f9 100644 --- a/src/path-seat.c +++ b/src/path-seat.c @@ -377,13 +377,6 @@ libinput_path_add_device(struct libinput *libinput, return NULL; } - /* We cannot do this during path_create_context because the log - * handler isn't set up there but we really want to log to the right - * place if the quirks run into parser errors. So we have to do it - * on the first call to add_device. - */ - libinput_init_quirks(libinput); - udev_device = udev_device_from_devnode(libinput, udev, path); if (!udev_device) { log_bug_client(libinput, "Invalid path %s\n", path); @@ -395,6 +388,13 @@ libinput_path_add_device(struct libinput *libinput, return NULL; } + /* We cannot do this during path_create_context because the log + * handler isn't set up there but we really want to log to the right + * place if the quirks run into parser errors. So we have to do it + * on the first call to add_device. + */ + libinput_init_quirks(libinput); + device = path_create_device(libinput, udev_device, NULL); udev_device_unref(udev_device); return device;