summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
Diffstat (limited to 'src/libudev')
-rw-r--r--src/libudev/libudev-hwdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libudev/libudev-hwdb.c b/src/libudev/libudev-hwdb.c
index 751b34209e..6779e45b4e 100644
--- a/src/libudev/libudev-hwdb.c
+++ b/src/libudev/libudev-hwdb.c
@@ -377,7 +377,7 @@ bool udev_hwdb_validate(struct udev_hwdb *hwdb) {
_public_ struct udev_list_entry *udev_hwdb_get_properties_list_entry(struct udev_hwdb *hwdb, const char *modalias, unsigned int flags) {
int err;
- if (!hwdb->f) {
+ if (!hwdb || !hwdb->f) {
errno = EINVAL;
return NULL;
}