mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
st/prober: Fix null dereference.
Found by clang-tidy.
This commit is contained in:
parent
e21b495f90
commit
c874d25ee3
|
@ -52,7 +52,7 @@ p_libuvc_probe(struct prober* p)
|
||||||
P_ERROR(p, "\tFailed to enumerate uvc devices\n");
|
P_ERROR(p, "\tFailed to enumerate uvc devices\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
p->uvc.count = 0;
|
||||||
// Count the number of UVC devices.
|
// Count the number of UVC devices.
|
||||||
while (p->uvc.list != NULL && p->uvc.list[p->uvc.count] != NULL) {
|
while (p->uvc.list != NULL && p->uvc.list[p->uvc.count] != NULL) {
|
||||||
p->uvc.count++;
|
p->uvc.count++;
|
||||||
|
|
Loading…
Reference in a new issue