summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/udev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/udev.c b/plugins/udev.c
index 84399ded..6720a0cd 100644
--- a/plugins/udev.c
+++ b/plugins/udev.c
@@ -86,7 +86,7 @@ static const char *get_serial(struct udev_device *udev_device)
entry = udev_list_entry_get_next(entry);
}
- if (strpbrk(serial, ".-_?*") != NULL)
+ if (serial && strpbrk(serial, ".-_?*") != NULL)
return NULL;
return serial;