summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/synclient.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/synclient.c b/tools/synclient.c
index fda1d88..ec6bc60 100644
--- a/tools/synclient.c
+++ b/tools/synclient.c
@@ -508,7 +508,9 @@ dp_get_device(Display *dpy)
unwind:
XFree(properties);
XFreeDeviceList(info);
- if (error && dev)
+ if (!dev)
+ fprintf(stderr, "Unable to find a synaptics device.\n");
+ else if (error && dev)
{
XCloseDevice(dpy, dev);
dev = NULL;