summaryrefslogtreecommitdiff
path: root/profiles/input/hog.c
diff options
context:
space:
mode:
Diffstat (limited to 'profiles/input/hog.c')
-rw-r--r--profiles/input/hog.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index 935a920fb..4dba83f71 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -132,8 +132,10 @@ static void hog_device_free(void *data)
struct hog_device *dev = data;
queue_remove(devices, dev);
- if (queue_isempty(devices))
+ if (queue_isempty(devices)) {
queue_destroy(devices, NULL);
+ devices = NULL;
+ }
btd_device_remove_attio_callback(dev->device, dev->attioid);
btd_device_unref(dev->device);