summaryrefslogtreecommitdiff
path: root/tools/shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/shared.c')
-rw-r--r--tools/shared.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/shared.c b/tools/shared.c
index d1f02702..d3fb6294 100644
--- a/tools/shared.c
+++ b/tools/shared.c
@@ -232,7 +232,7 @@ open_restricted(const char *path, int flags, void *user_data)
if (fd < 0)
fprintf(stderr, "Failed to open %s (%s)\n",
path, strerror(errno));
- else if (*grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1)
+ else if (grab && *grab && ioctl(fd, EVIOCGRAB, (void*)1) == -1)
fprintf(stderr, "Grab requested, but failed for %s (%s)\n",
path, strerror(errno));