summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evemu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/evemu.c b/src/evemu.c
index ee24631..6edc4d5 100644
--- a/src/evemu.c
+++ b/src/evemu.c
@@ -135,6 +135,9 @@ struct evemu_device *evemu_new(const char *name)
void evemu_delete(struct evemu_device *dev)
{
+ if (dev == NULL)
+ return;
+
if (dev->uidev)
evemu_destroy(dev);
libevdev_free(dev->evdev);