[PATCH libinput 4/4] path: add error handling for failing to create a seat

Peter Hutterer peter.hutterer at who-t.net
Mon Feb 3 13:22:35 PST 2014


Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
---
 src/path.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/path.c b/src/path.c
index 7a00c0b..a2878f9 100644
--- a/src/path.c
+++ b/src/path.c
@@ -144,6 +144,11 @@ path_input_enable(struct libinput *libinput)
 
 	seat = path_seat_create(input, seat_name, seat_logical_name);
 
+	if (!seat) {
+		log_info("failed to create seat for device '%s'.\n", devnode);
+		goto out;
+	}
+
 	device = evdev_device_create(&seat->base, devnode, sysname, fd);
 	libinput_seat_unref(&seat->base);
 
-- 
1.8.4.2



More information about the wayland-devel mailing list