android/hog: Fix not resetting properly on detach

This commit is contained in:
Luiz Augusto von Dentz 2014-06-30 16:47:52 +03:00 committed by Szymon Janc
parent 714434769a
commit 31fa4c92d1

View File

@ -1007,7 +1007,10 @@ void bt_hog_detach(struct bt_hog *hog)
for (l = hog->reports; l; l = l->next) {
struct report *r = l->data;
g_attrib_unregister(hog->attrib, r->notifyid);
if (r->notifyid > 0) {
g_attrib_unregister(hog->attrib, r->notifyid);
r->notifyid = 0;
}
}
if (hog->scpp)