st/prober: Fix null dereference.

Found by clang-tidy.
This commit is contained in:
Ryan Pavlik 2019-08-16 17:00:31 -05:00
parent e21b495f90
commit c874d25ee3

View file

@ -52,7 +52,7 @@ p_libuvc_probe(struct prober* p)
P_ERROR(p, "\tFailed to enumerate uvc devices\n");
return -1;
}
p->uvc.count = 0;
// Count the number of UVC devices.
while (p->uvc.list != NULL && p->uvc.list[p->uvc.count] != NULL) {
p->uvc.count++;