diff --git a/profiles/input/hog-lib.c b/profiles/input/hog-lib.c
index ace233d..021db38 100644
--- a/profiles/input/hog-lib.c
+++ b/profiles/input/hog-lib.c
struct report *report;
GSList *l;
+ if (!chr)
+ return NULL;
+
/* Skip if report already exists */
l = g_slist_find_custom(hog->reports, chr, report_chrc_cmp);
if (l)
chr = l->data;
next = l->next ? l->next->data : NULL;
+ if (!chr)
+ continue;
+
DBG("0x%04x UUID: %s properties: %02x",
chr->handle, chr->uuid, chr->properties);
chr = l->data;
next = l->next ? l->next->data : NULL;
+ if (!chr)
+ continue;
+
DBG("0x%04x UUID: %s properties: %02x",
chr->handle, chr->uuid, chr->properties);