From 5adde65d6be8f46278fd2ba605712b2312aeb5ad Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Mon, 2 Mar 2015 16:46:19 +1000 Subject: [PATCH] tablet: warn if the libwacom context fails to initalize Signed-off-by: Peter Hutterer --- src/evdev-tablet.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/evdev-tablet.c b/src/evdev-tablet.c index b39df500..9b8b77ee 100644 --- a/src/evdev-tablet.c +++ b/src/evdev-tablet.c @@ -587,14 +587,18 @@ tool_set_bits_from_libwacom(const struct tablet_dispatch *tablet, int rc = 1; #if HAVE_LIBWACOM + struct libinput *libinput = tablet->device->base.seat->libinput; WacomDeviceDatabase *db; const WacomStylus *s = NULL; int code; WacomStylusType type; db = libwacom_database_new(); - if (!db) + if (!db) { + log_info(libinput, + "Failed to initialize libwacom context.\n"); goto out; + } s = libwacom_stylus_get_for_id(db, tool->tool_id); if (!s) goto out; @@ -1017,8 +1021,11 @@ tablet_init_left_handed(struct evdev_device *device) pid = evdev_device_get_id_product(device); db = libwacom_database_new(); - if (!db) + if (!db) { + log_info(libinput, + "Failed to initialize libwacom context.\n"); return; + } error = libwacom_error_new(); d = libwacom_new_from_usbid(db, vid, pid, error);